Mohamed Boudra
059d543c97
refactor(server/tests): clear 146 type-aware lint errors in session tests (T1.a) (#753)
Replace `as unknown as SessionOptions["X"]` call-site casts with typed stub
helpers from a new `test-utils/session-stubs.ts` module. Unsafe assertions
are now contained to that single infrastructure file, keeping all call sites
in the two fully-fixed test files clean.
Files fully fixed (typeAware: true → 0 errors):
- session.workspaces.test.ts: 119 → 0
- session.test.ts: 27 → 0
Helpers added in session-stubs.ts:
- asSessionLogger / asAgentManager / asAgentStorage / asDownloadTokenStore /
asPushTokenStore / asChatService / asScheduleService / asLoopService /
asCheckoutDiffManager / asDaemonConfigStore / asTerminalManager /
asGitHubService / asWorkspaceGitService / asScriptRouteStore /
asWorkspaceScriptRuntimeStore
- asSessionInternals<T> for private session access
- filterByType / findByType message helpers
- createProviderSnapshotManagerStub returning typed spy refs
2026-05-05 19:58:56 +07:00
..
2026-05-05 19:58:56 +07:00
2026-05-05 19:58:55 +07:00
2026-05-05 19:56:26 +07:00
2026-05-05 19:56:26 +07:00
2026-05-05 19:40:12 +07:00
2026-05-05 19:56:52 +07:00
2026-05-05 19:58:56 +07:00
2026-05-05 19:40:12 +07:00