ktongue/docker_container / .cache /opencode /node_modules /zod /src /v3 /tests /object-in-es5-env.test.ts
download
raw
778 Bytes
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
const RealSet = Set;
const RealMap = Map;
const RealDate = Date;
test("doesn’t throw when Date is undefined", () => {
delete (globalThis as any).Date;
const result = z.object({}).safeParse({});
expect(result.success).toEqual(true);
globalThis.Date = RealDate;
});
test("doesn’t throw when Set is undefined", () => {
delete (globalThis as any).Set;
const result = z.object({}).safeParse({});
expect(result.success).toEqual(true);
globalThis.Set = RealSet;
});
test("doesn’t throw when Map is undefined", () => {
delete (globalThis as any).Map;
const result = z.object({}).safeParse({});
expect(result.success).toEqual(true);
globalThis.Map = RealMap;
});

Xet Storage Details

Size:
778 Bytes
·
Xet hash:
ec04082505eb924bb966cfc20b214ea83a7a8b2bfd440506e9ea2e84f41cd35d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.