Skip to content

Commit

Permalink
feat(validator): add unexpected unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
NWYLZW committed Mar 3, 2024
1 parent cd7d330 commit 0ac91c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/validator/tests/types/structural.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,11 @@ describe('tuple', () => {
const output = t0.validate(input0)
expect(output).toEqual(input0)
expectTypeOf(output).toEqualTypeOf<[string]>()

const input1 = [1]
expect(() => {
// @ts-expect-error
t0.validate(input1)
}).toThrow('Data is unexpected')
})
})

0 comments on commit 0ac91c3

Please sign in to comment.