Files
klz-cables.com/.pnpm-store/v10/files/8f/cdd659f92eaacb50e25ceb5e27fd3211db76012a7236c6ff784b433e5742186857260fd9152fc516b3023910c5cdd85869e3c1e2b8bd2e015037dd81839bcf
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

23 lines
644 B
Plaintext

import { expect, test } from "vitest";
import * as z from "zod/v4-mini";
test("no locale by default", () => {
const result = z.safeParse(z.string(), 12);
expect(result.success).toEqual(false);
expect(result.error!.issues.length).toEqual(1);
expect(result.error!.issues[0].message).toEqual("Invalid input");
});
test("error inheritance", () => {
const e1 = z.string().safeParse(123).error!;
expect(e1).toBeInstanceOf(z.core.$ZodError);
// expect(e1).not.toBeInstanceOf(Error);
try {
z.string().parse(123);
} catch (e2) {
expect(e2).toBeInstanceOf(z.core.$ZodRealError);
expect(e2).toBeInstanceOf(Error);
}
});