deno.land / x / zod@v3.19.1 / __tests__ / masking.test.ts

masking.test.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// @ts-ignore TS6133import { expect } from "https://deno.land/x/expect@v0.2.6/mod.ts";const test = Deno.test;
import * as z from "../index.ts";
test("masking test", () => {});
test("require", () => { const baseSchema = z.object({ firstName: z.string(), middleName: z.string().optional(), lastName: z.union([z.undefined(), z.string()]), otherName: z.union([z.string(), z.undefined(), z.string()]), }); baseSchema; // const reqBase = baseSchema.require(); // const ewr = reqBase.shape; // expect(ewr.firstName).toBeInstanceOf(z.ZodString); // expect(ewr.middleName).toBeInstanceOf(z.ZodString); // expect(ewr.lastName).toBeInstanceOf(z.ZodString); // expect(ewr.otherName).toBeInstanceOf(z.ZodUnion);});
zod

Version Info

Tagged at
a year ago