Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit 50167bb

Browse files
committed
test: added text encoder globally
1 parent 0774f69 commit 50167bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jest.setup.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import {TextDecoder, TextEncoder} from 'node:util';
12
import fetch, {Request, Response} from 'node-fetch';
23
import {server} from './tests/mocks';
34

45
beforeAll(() => {
56
global.fetch = fetch;
67
global.Request = Request;
78
global.Response = Response;
9+
global.TextEncoder = TextEncoder;
10+
global.TextDecoder = TextDecoder;
811

912
// Establish API mocking before all tests.
1013
server.listen()

0 commit comments

Comments
 (0)