Files
memecoin-botV2/.pnpm-store/v10/files/95/07ddab0ac28fdb2cff648df085eba0a85968f4c8a161c73fcc2c7ec953add6f4e78382b962ee1c3b47b01c52acb7b68a87a1aa15a432a2925e94c635a7bd93

14 lines
402 B
Plaintext

import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("type inference", () => {
const schema = z.string().array();
expectTypeOf<z.infer<typeof schema>>().toEqualTypeOf<string[]>();
});
test("url regex", () => {
expect((z.url({ hostname: /^example\.com$/ }).safeParse("http://example.org/").error?.issues[0] as any).pattern).toBe(
"^example\\.com$"
);
});