2022-07-27 10:09:13 +08:00
|
|
|
import dotenv from 'dotenv';
|
2023-07-21 14:12:01 +08:00
|
|
|
import { setDefaultOptions } from 'expect-puppeteer';
|
2022-12-12 21:15:09 +08:00
|
|
|
import fetch from 'node-fetch';
|
2022-06-16 13:00:01 +08:00
|
|
|
import { TextDecoder, TextEncoder } from 'text-encoder';
|
|
|
|
|
2022-12-12 21:15:09 +08:00
|
|
|
const { jest } = import.meta;
|
2022-06-16 13:00:01 +08:00
|
|
|
|
2022-07-27 10:09:13 +08:00
|
|
|
dotenv.config();
|
|
|
|
|
2022-06-16 13:00:01 +08:00
|
|
|
/* eslint-disable @silverhand/fp/no-mutation */
|
|
|
|
global.fetch = fetch;
|
|
|
|
global.TextDecoder = TextDecoder;
|
|
|
|
global.TextEncoder = TextEncoder;
|
|
|
|
/* eslint-enable @silverhand/fp/no-mutation */
|
2022-09-02 17:20:09 +08:00
|
|
|
|
2023-07-21 14:12:01 +08:00
|
|
|
// GitHub Actions default runners need more time for UI tests
|
|
|
|
jest.setTimeout(60_000);
|
|
|
|
setDefaultOptions({ timeout: 5000 });
|