Rocky_Mountain_Vending/.pnpm-store/v10/files/14/107e3da06cf479695c5f54e24ac0cd3f1d5bdb7b2a34b03e04fb99969f1aa8b697e1bb142a656dc4d88a3e262e303920b002966c5e6eb97d0d8c1595214d19
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

108 lines
3.2 KiB
Text

import { test } from "vitest";
// import * as z from "zod/v4";
test(() => {});
// test("overload types", () => {
// const schema = z.string().json();
// util.assertEqual<typeof schema, z.ZodString>(true);
// const schema2 = z.string().json(z.number());
// util.assertEqual<typeof schema2, z.ZodPipe<z.ZodTransform<any, string>, z.ZodNumber>>(true);
// const r2 = schema2.parse("12");
// util.assertEqual<number, typeof r2>(true);
// });
// test("parse string to json", async () => {
// const Env = z.object({
// myJsonConfig: z.string().jsonString(z.object({ foo: z.number() })),
// someOtherValue: z.string(),
// });
// expect(
// Env.parse({
// myJsonConfig: '{ "foo": 123 }',
// someOtherValue: "abc",
// })
// ).toEqual({
// myJsonConfig: { foo: 123 },
// someOtherValue: "abc",
// });
// const invalidValues = Env.safeParse({
// myJsonConfig: '{"foo": "not a number!"}',
// someOtherValue: null,
// });
// expect(JSON.parse(JSON.stringify(invalidValues))).toEqual({
// success: false,
// error: {
// name: "ZodError",
// issues: [
// {
// code: "invalid_type",
// expected: "number",
// input: "not a number!",
// received: "string",
// path: ["myJsonConfig", "foo"],
// message: "Expected number, received string",
// },
// {
// code: "invalid_type",
// expected: "string",
// input: null,
// received: "null",
// path: ["someOtherValue"],
// message: "Expected string, received null",
// },
// ],
// },
// });
// const invalidJsonSyntax = Env.safeParse({
// myJsonConfig: "This is not valid json",
// someOtherValue: null,
// });
// expect(JSON.parse(JSON.stringify(invalidJsonSyntax))).toMatchObject({
// success: false,
// error: {
// name: "ZodError",
// issues: [
// {
// code: "invalid_string",
// input: {
// _def: {
// catchall: {
// _def: {
// typeName: "ZodNever",
// },
// },
// typeName: "ZodObject",
// unknownKeys: "strip",
// },
// },
// validation: "json",
// message: "Invalid json",
// path: ["myJsonConfig"],
// },
// {
// code: "invalid_type",
// expected: "string",
// input: null,
// received: "null",
// path: ["someOtherValue"],
// message: "Expected string, received null",
// },
// ],
// },
// });
// });
// test("no argument", () => {
// const schema = z.string().json();
// util.assertEqual<typeof schema, z.ZodString>(true);
// z.string().json().parse(`{}`);
// z.string().json().parse(`null`);
// z.string().json().parse(`12`);
// z.string().json().parse(`{ "test": "test"}`);
// expect(() => z.string().json().parse(`asdf`)).toThrow();
// expect(() => z.string().json().parse(`{ "test": undefined }`)).toThrow();
// expect(() => z.string().json().parse(`{ "test": 12n }`)).toThrow();
// expect(() => z.string().json().parse(`{ test: "test" }`)).toThrow();
// });