2 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 465f078e77 Extract RelayHealthManager and helpers to dedicated modules
- Extracted `RelayHealthManager` to `src/relay-health-manager.mjs`.
- Extracted `LockPublisher` to `src/lock-publisher.mjs`.
- Consolidated `withTimeout`, `mergeRelayList`, `relayListLabel` into `src/lock-utils.mjs`.
- Refactored `src/lock-ops.mjs` to import from these new modules, acting as a facade.
- Updated `src/relay-health.mjs` to import `withTimeout` from `src/lock-utils.mjs`.
- Updated tests to import from correct locations.
- Removed duplicate implementations and significantly reduced `src/lock-ops.mjs` size.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 22:00:50 +00:00
google-labs-jules[bot]andPR0M3TH3AN b644aa6db8 Fix: Move withTimeout tests to isolated file to avoid MockTimer interference
Moved unit tests for `withTimeout` from `test/utils.test.mjs` to `test/utils-async.test.mjs`.
This prevents potential interference from `MockTimers` enabled in `test/utils.test.mjs` which could affect `setTimeout` behavior in async tests.
Increased timeout margins in `withTimeout` tests for better reliability in CI.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 18:15:43 +00:00