0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/integration-tests/jest.setup.js
Gao Sun 6d56434b48
refactor: use ky in integration tests (#5584)
* refactor: use ky in integration tests

* refactor: remove node-fetch

* refactor: fix test cases

* refactor: remove waitFor after each test
2024-03-29 10:10:13 +00:00

20 lines
540 B
JavaScript

import dotenv from 'dotenv';
import { setDefaultOptions } from 'expect-puppeteer';
import { TextDecoder, TextEncoder } from 'text-encoder';
const { jest } = import.meta;
dotenv.config();
/* eslint-disable @silverhand/fp/no-mutation */
global.TextDecoder = TextDecoder;
global.TextEncoder = TextEncoder;
global.fail = (message) => {
throw new Error(message);
};
/* eslint-enable @silverhand/fp/no-mutation */
// GitHub Actions default runners need more time for UI tests
jest.setTimeout(60_000);
setDefaultOptions({ timeout: 5000 });