We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e47a43 commit 3ec5e52Copy full SHA for 3ec5e52
1 file changed
express-zod-api/tests/env.spec.ts
@@ -1,8 +1,17 @@
1
import createHttpError from "http-errors";
2
import * as R from "ramda";
3
import { z } from "zod";
4
+import { createRequire } from "node:module";
5
6
describe("Environment checks", () => {
7
+ describe("Zod global registry", () => {
8
+ test("is shared across both of its ESM and CJS packages", () => {
9
+ createRequire(import.meta.url)("zod");
10
+ const { globalRegistry } = createRequire(import.meta.url)("zod");
11
+ expect(globalRegistry).toBe(z.globalRegistry);
12
+ });
13
14
+
15
describe("Zod Dates", () => {
16
test.each(["2021-01-32", "22/01/2022", "2021-01-31T25:00:00.000Z"])(
17
"should detect invalid date %#",
0 commit comments