ghost-telemetry-frontend/setupJest.js
Uncle Fatso e63dad2106
initial commit for public repo
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2024-12-23 15:01:54 +03:00

10 lines
304 B
JavaScript

// This file runs some code before a jest test.
// polyfill TextEncoder/TextDecoder since they aren't in jsdom:
const { TextEncoder, TextDecoder } = require('util');
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
// polyfill fetch since it's not in jsdom:
require('whatwg-fetch');