Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Harris-Miller committed Feb 4, 2024
1 parent 7c54594 commit d6a93fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/groupBy.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expectError, expectType } from 'tsd';
import { expectType, expectNotType } from 'tsd';
import { toPairs, groupBy, __ } from '../es';

type Student = { score: number; name: string };
Expand Down Expand Up @@ -28,4 +28,4 @@ expectType<Record<'A' | 'B' | 'C' | 'D' | 'F', Student[]>>(grouped2);
// toPairs returns expected
const entries = toPairs({} as Record<string, Student[]>);
expectType<[string, Student[]][]>(entries);
expectError<[string, Student[] | undefined][]>(entries); // this assertion was true before when groupBy returned `Partial<Record<>>`
expectNotType<[string, Student[] | undefined][]>(entries); // this assertion was true before when groupBy returned `Partial<Record<>>`

0 comments on commit d6a93fa

Please sign in to comment.