Skip to content

Commit 9152157

Browse files
committed
add a bit more test checks
1 parent 2455fb3 commit 9152157

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/start-client-core/src/tests/createServerFn.test-d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { TSS_SERVER_FUNCTION } from '../constants'
55
import type {
66
Constrain,
77
Register,
8+
ValidateSerializableInput,
89
TsrSerializable,
910
Validator,
1011
} from '@tanstack/router-core'
@@ -311,7 +312,10 @@ test('createServerFn returns Date', () => {
311312
dates: [new Date(), new Date()] as const,
312313
}))
313314

314-
expectTypeOf(fn()).toEqualTypeOf<Promise<{ dates: readonly [Date, Date] }>>()
315+
expectTypeOf<ReturnType<typeof fn>>().toMatchTypeOf<Promise<unknown>>()
316+
expectTypeOf<Awaited<ReturnType<typeof fn>>>().toMatchTypeOf<
317+
ValidateSerializableInput<Register, { dates: readonly [Date, Date] }>
318+
>()
315319
})
316320

317321
test('createServerFn returns undefined', () => {

0 commit comments

Comments
 (0)