mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user