 google-labs-jules[bot]andPR0M3TH3AN
|
a31332457d
|
test: add unit tests for roster loading logic
- Implemented dependency injection in `src/roster.mjs` to allow mocking `fs` and `loadTorchConfig`.
- Added `test/roster.test.mjs` with comprehensive test cases:
- Fallback behavior when no files/config exist.
- Priority of `torch/roster.json` (User Roster) over `roster.json` (CWD).
- Internal module roster fallback.
- Environment variable overrides.
- Configuration overrides.
- Error handling for malformed JSON or missing fields.
- Exported `_resetRosterCache`, `_setRosterDependencies`, and `_restoreRosterDependencies` for testing purposes.
Co-authored-by: PR0M3TH3AN <[email protected]>
|
2026-02-18 03:31:12 +00:00 |
|