Skip to content

Commit 43b87ad

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

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
@@ -6,6 +6,7 @@ import type {
66
Constrain,
77
Register,
88
TsrSerializable,
9+
ValidateSerializableInput,
910
Validator,
1011
} from '@tanstack/router-core'
1112
import type {
@@ -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)