-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjest.config.js
44 lines (43 loc) · 1.34 KB
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const os = require("node:os");
const isWin = os.platform() === "win32";
/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
const config = {
preset: "ts-jest",
testEnvironmentOptions: {
url: "http://localhost/",
},
testMatch: [
"<rootDir>/tests/*.test.ts",
// TODO: enable after migrating to separated repo
"<rootDir>/tests/e2e/*.test.js",
],
testPathIgnorePatterns: [
// TODO: check why http proxy server throw error with websocket server
"<rootDir>/tests/e2e/allowed-hosts.test.js",
// TODO: check why this test timeout
"<rootDir>/tests/e2e/host.test.js",
// TODO: check why this test throw error when run with other tests
"<rootDir>/tests/e2e/watch-files.test.js",
// TODO: check why this test timeout
"<rootDir>/tests/e2e/web-socket-server-url.test.js",
],
cache: false,
testTimeout: process.env.CI ? 120000 : 30000,
transform: {
"(.*)\\.{js,ts}": [
"ts-jest",
{
tsconfig: "<rootDir>/tests/tsconfig.json",
},
],
},
// Add this to find out which test timeouts
// testSequencer: "<rootDir>/tests/helpers/sequencer.js",
snapshotResolver: "<rootDir>/tests/helpers/snapshot-resolver.js",
setupFilesAfterEnv: ["<rootDir>/tests/helpers/setup-test.js"],
globalSetup: "<rootDir>/tests/helpers/global-setup-test.js",
moduleNameMapper: {
"^uuid$": require.resolve("uuid"),
},
};
module.exports = config;