Buckets:
| // @ts-ignore TS6133 | |
| import { expect, test } from "vitest"; | |
| import * as z from "zod/v3"; | |
| const schema = z.nan(); | |
| test("passing validations", () => { | |
| schema.parse(Number.NaN); | |
| schema.parse(Number("Not a number")); | |
| }); | |
| test("failing validations", () => { | |
| expect(() => schema.parse(5)).toThrow(); | |
| expect(() => schema.parse("John")).toThrow(); | |
| expect(() => schema.parse(true)).toThrow(); | |
| expect(() => schema.parse(null)).toThrow(); | |
| expect(() => schema.parse(undefined)).toThrow(); | |
| expect(() => schema.parse({})).toThrow(); | |
| expect(() => schema.parse([])).toThrow(); | |
| }); | |
Xet Storage Details
- Size:
- 587 Bytes
- Xet hash:
- e22ce8a3c2e4237fb069ad3f7fcd39d9d57aecff95319b45e9ee5f50476f7be9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.