Skip to content

Commit 21d2216

Browse files
committed
Adds an additional test to ensure test failure is not false negative
1 parent 7266e69 commit 21d2216

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,5 +1130,8 @@ describe("jsonSchemaObjectToZodRawShape", () => {
11301130

11311131
// Test refinement with invalid age
11321132
expect(() => customSchema.parse({ age: 16 })).toThrow();
1133+
1134+
// Refinement with correct age, using same format as above test to confirm error was throw for correct reason
1135+
expect(() => customSchema.parse({ age: 19 })).not.toThrow();
11331136
});
11341137
});

0 commit comments

Comments
 (0)