-
Notifications
You must be signed in to change notification settings - Fork 72
/
jest.integration.config.ts
40 lines (37 loc) · 1.16 KB
/
jest.integration.config.ts
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
import type { Config } from "jest";
const config: Config = {
setupFilesAfterEnv: ["<rootDir>/testSetup.integration.ts"],
testMatch: ["<rootDir>/packages/**/__integration__/**/*.test.[jt]s?(x)"],
preset: "ts-jest",
testEnvironment: "node",
maxConcurrency: 1,
maxWorkers: 1,
// TODO: keep testTimeout low and use jest.setTimeout for long ones
testTimeout: 120000,
transform: {
"^.+\\.(ts|tsx)$": "ts-jest",
"^.+\\.(js)$": "babel-jest",
},
testPathIgnorePatterns: [
"scripts",
"<rootDir>/emails/",
"<rootDir>/.mailing/",
"<rootDir>/packages/cli/.mailing",
"<rootDir>/packages/cli/src/pages/.*/__test__",
"<rootDir>/packages/cli/src/components",
],
watchPathIgnorePatterns: [
"<rootDir>/emails/",
"<rootDir>/packages/cli/src/emails/",
"<rootDir>/.mailing/",
"tmp-testMailQueue.json",
],
modulePathIgnorePatterns: [
"<rootDir>/packages/.*/__mocks__/index.ts",
"<rootDir>/packages/.*/.mailing/*",
],
};
// Point to the correct DB in dev
process.env.MAILING_DATABASE_URL = process.env.MAILING_DATABASE_URL_TEST;
process.env.WEB_DATABASE_URL = process.env.WEB_DATABASE_URL_TEST;
export default config;