Commit Graph
1 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 6fa8df5006 test(services): add unit tests for trustBootstrap.js
Adds a new test file `tests/services/trustBootstrap.test.mjs` to cover the functionality of `bootstrapTrustedSeeds` in `js/services/trustBootstrap.js`.

The test suite covers:
- Feature flag validation
- Successful seed application when access control is ready
- Subscription to access control changes
- Fallback/timeout handling for access control readiness
- Retry logic for relay readiness

Uses `node:test` and mocks dependencies `accessControl`, `moderationService`, `nostrService` via dynamic imports to handle singleton instantiation side effects.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 14:15:31 +00:00