Download .opencode/node_modules/zod/src/v4/classic/tests/coalesce.test.ts from Chenloong999/opencode-data: direct link, hf CLI and curl.
- Browser
- Download file 743 Bytes
-
https://huggingface.co/datasets/Chenloong999/opencode-data/resolve/main/.opencode/node_modules/zod/src/v4/classic/tests/coalesce.test.ts
- Command line
-
hf download hf://datasets/Chenloong999/opencode-data/.opencode/node_modules/zod/src/v4/classic/tests/coalesce.test.ts
-
curl -L -o coalesce.test.ts https://huggingface.co/datasets/Chenloong999/opencode-data/resolve/main/.opencode/node_modules/zod/src/v4/classic/tests/coalesce.test.ts
743 Bytes
| import { expect, test } from "vitest"; | |
| test("coalesce", () => { | |
| expect(true).toBe(true); | |
| }); | |
| // test("nonoptional with default", () => { | |
| // const schema = z.string().optional().coalesce("hi"); | |
| // expectTypeOf<typeof schema._input>().toEqualTypeOf<string | undefined>(); | |
| // expectTypeOf<typeof schema._output>().toEqualTypeOf<string>(); | |
| // expect(schema.parse(undefined)).toBe("hi"); | |
| // }); | |
| // test("nonoptional in object", () => { | |
| // const schema = z.object({ hi: z.string().optional().nonoptional("hi") }); | |
| // expectTypeOf<typeof schema._input>().toEqualTypeOf<{ hi: string | undefined }>(); | |
| // expectTypeOf<typeof schema._output>().toEqualTypeOf<{ hi: string }>(); | |
| // expect(schema.parse(undefined)).toBe("hi"); | |
| // }); | |