Skip to content

Commit

Permalink
test: narrow type assertion
Browse files Browse the repository at this point in the history
Co-authored-by: Alec Larson <[email protected]>
  • Loading branch information
crishoj and aleclarson committed Aug 7, 2024
1 parent f7ab271 commit 2acdb89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/random/draw.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ describe('draw types', () => {
})
test('return type is not null for immutable non-empty array variables', () => {
const filledList = [1, 2, 4] as const
expectTypeOf(_.draw(filledList)).toBeNumber()
expectTypeOf(_.draw(filledList)).toEqualTypeOf<1 | 2 | 4>()
})
})

0 comments on commit 2acdb89

Please sign in to comment.