fix(tests): let the spool handler stub carry a payload

`ReturnType<typeof of>` resolves against the zero-argument overload, so the
stub only accepted `Observable<never>` 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.
This commit is contained in:
Maurice
2026-09-09 10:11:36 +02:00
parent 2a38e79431
commit a463246c1c
@@ -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<string, unknown>): ExecutionContext {
return { switchToHttp: () => ({ getRequest: () => req }) } as unknown as ExecutionContext;
}
function handler(observable: ReturnType<typeof of>): CallHandler {
function handler(observable: Observable<unknown>): CallHandler {
return { handle: () => observable } as CallHandler;
}