continue-custom/core/test/vitest.setup.ts
2025-06-13 11:11:38 +05:30

16 lines
402 B
TypeScript

import { TextDecoder, TextEncoder } from "util";
import fetch, { Request, Response } from "node-fetch";
import { beforeAll } from "vitest";
beforeAll(() => {
// @ts-ignore
globalThis.fetch = fetch;
// @ts-ignore
globalThis.Request = Request;
// @ts-ignore
globalThis.Response = Response;
globalThis.TextEncoder = TextEncoder;
// @ts-ignore
globalThis.TextDecoder = TextDecoder;
});