mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-31 09:51:52 +00:00
Refactor src/lib.mjs to support dependency injection for cmdCheck, cmdLock, and cmdList. This allows unit testing without heavy mocking frameworks or side effects. Add test/lib.test.mjs covering: - cmdCheck: happy path, paused/excluded agents, unknown agents. - cmdLock: success, roster check, existing lock check, race check (lost), dry run. - cmdList: listing locks, empty state. Coverage for src/lib.mjs is now significantly improved. Verification: Ran `npm test` and verified all tests pass. Co-authored-by: PR0M3TH3AN <[email protected]>