| 1 | import { TextDecoder, TextEncoder } from "util"; |
| 2 | |
| 3 | import fetch, { Request, Response } from "node-fetch"; |
| 4 | import { beforeAll } from "vitest"; |
| 5 | |
| 6 | beforeAll(() => { |
| 7 | // @ts-ignore |
| 8 | globalThis.fetch = fetch; |
| 9 | // @ts-ignore |
| 10 | globalThis.Request = Request; |
| 11 | // @ts-ignore |
| 12 | globalThis.Response = Response; |
| 13 | globalThis.TextEncoder = TextEncoder; |
| 14 | // @ts-ignore |
| 15 | globalThis.TextDecoder = TextDecoder; |
| 16 | }); |