From a463246c1c99ab3726fcf6e1b8f0c52f72552e78 Mon Sep 17 00:00:00 2001 From: Maurice Date: Wed, 9 Sep 2026 10:11:36 +0200 Subject: [PATCH] fix(tests): let the spool handler stub carry a payload `ReturnType` resolves against the zero-argument overload, so the stub only accepted `Observable` and SPOOL-001 could not hand it the `of('ok')` it needs. tsc -p tsconfig.tests.json broke on it, which sank the server preflight job and with it every coverage job that needs it. --- server/tests/unit/nest/spool-cleanup.interceptor.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/tests/unit/nest/spool-cleanup.interceptor.test.ts b/server/tests/unit/nest/spool-cleanup.interceptor.test.ts index 4a37bf90d..d3eb4b80f 100644 --- a/server/tests/unit/nest/spool-cleanup.interceptor.test.ts +++ b/server/tests/unit/nest/spool-cleanup.interceptor.test.ts @@ -1,5 +1,6 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { firstValueFrom, of, throwError } from 'rxjs'; +import type { Observable } from 'rxjs'; import type { CallHandler, ExecutionContext } from '@nestjs/common'; const fsMock = vi.hoisted(() => ({ unlinkSync: vi.fn() })); @@ -11,7 +12,7 @@ function context(req: Record): ExecutionContext { return { switchToHttp: () => ({ getRequest: () => req }) } as unknown as ExecutionContext; } -function handler(observable: ReturnType): CallHandler { +function handler(observable: Observable): CallHandler { return { handle: () => observable } as CallHandler; }