Plan: Fix unit test failures on rc/multi-tenant#
Summary#
Fix 2 failing test suites (8 failures total) caused by the pipeline refactor that removed the execute phase and a missing @nestjs/websockets dependency. All watchdog test fixtures reference currentPhase: 'execute' which no longer exists in PHASE_ORDER, and the ws-gateway spec cannot resolve its gateway import.
Files#
| File | Action | Description |
|---|---|---|
src/watchdog/watchdog.service.spec.ts | modify | Replace currentPhase: 'execute' with 'deliver' in 5 test fixtures; update phase assertions |
src/ws-gateway/ws-gateway.gateway.ts | inspect | Verify @nestjs/websockets import — root cause of suite failure |
package.json | modify | Add @nestjs/websockets + @nestjs/platform-ws as dependencies (if missing) |
Steps#
- Replace
'execute'phase references in watchdog spec — changecurrentPhase: 'execute'to'deliver'in all 5 affected test fixtures (lines 77, 100, 197, 226, 252, 295); update corresponding assertion strings (phase: 'execute'->'deliver') at lines 91, 266, 305. - Install missing
@nestjs/websocketsdependency — add@nestjs/websocketsand@nestjs/platform-wstopackage.jsonso the ws-gateway module resolves correctly. - Run
npm test,tsc --noEmit, andnpm run lint— verify all 44 suites pass with zero failures.
Verification#
npm test— 0 failures, all 44 suites passtsc --noEmit— no type errorsnpm run lint— zero warnings
Risks#
- The
@nestjs/websocketsmissing dependency may be intentional (optional module) — if so, the ws-gateway spec should be skipped or the import mocked instead of adding the dependency.