2022-06-16 00:00:01 -05:00
|
|
|
// Need to disable following rules to mock text-decode/text-encoder and crypto for jsdom
|
|
|
|
// https://github.com/jsdom/jsdom/issues/1612
|
|
|
|
import { Crypto } from '@peculiar/webcrypto';
|
2022-07-26 21:09:13 -05:00
|
|
|
import dotenv from 'dotenv';
|
2022-12-12 08:15:09 -05:00
|
|
|
import fetch from 'node-fetch';
|
2022-06-16 00:00:01 -05:00
|
|
|
import { TextDecoder, TextEncoder } from 'text-encoder';
|
|
|
|
|
2022-12-12 08:15:09 -05:00
|
|
|
const { jest } = import.meta;
|
2022-06-16 00:00:01 -05:00
|
|
|
|
2022-07-26 21:09:13 -05:00
|
|
|
dotenv.config();
|
|
|
|
|
2022-06-16 00:00:01 -05:00
|
|
|
/* eslint-disable @silverhand/fp/no-mutation */
|
|
|
|
global.crypto = new Crypto();
|
|
|
|
global.fetch = fetch;
|
|
|
|
global.TextDecoder = TextDecoder;
|
|
|
|
global.TextEncoder = TextEncoder;
|
|
|
|
/* eslint-enable @silverhand/fp/no-mutation */
|
2022-09-02 04:20:09 -05:00
|
|
|
|
2022-09-07 09:31:49 -05:00
|
|
|
jest.setTimeout(10_000);
|