-
Notifications
You must be signed in to change notification settings - Fork 19
/
jest.config.js
43 lines (41 loc) · 1.1 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
/*eslint no-undef: "error"*/
/*eslint-env node*/
process.env.TZ = "UTC"
process.env.NODE_ENV = "test"
process.env.UNLEASH_ENV = "development"
module.exports = {
testRegex: "/*.test.(tsx|ts)$",
collectCoverageFrom: ["**/*.(tsx|ts)"],
coveragePathIgnorePatterns: ["<rootDir>/packs"],
coverageReporters: ["lcov"],
coverageDirectory: "test-coverage",
coverageThreshold: {
global: {
branches: 70,
functions: 70,
lines: 80,
statements: 80,
},
},
preset: "ts-jest",
rootDir: "./app/javascript",
roots: ["<rootDir>/"],
transform: {
"^.+\\.(ts|tsx)$": [
"ts-jest",
{
// ts-jest configuration goes here
tsconfig: "tsconfig.json",
},
],
},
setupFilesAfterEnv: ["<rootDir>/__tests__/setupTests.ts"],
setupFiles: ["<rootDir>/__tests__/jest.setup.js"],
moduleNameMapper: {
"\\.(scss|css|less|jpg)$": "identity-obj-proxy",
"^axios$": require.resolve("axios"),
},
transformIgnorePatterns: ["node_modules/?!(@bloom-housing/ui-components)"],
moduleFileExtensions: ["js", "jsx", "ts", "tsx"],
testEnvironment: "jsdom",
}