-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
23 lines (22 loc) · 914 Bytes
/
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
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
module.exports = {
testEnvironment: "jsdom",
clearMocks: true,
collectCoverage: true,
coverageDirectory: "./.tests/coverage",
setupFilesAfterEnv: ["<rootDir>/.tests/jest-setup.ts"],
coverageProvider: "babel",
moduleNameMapper: {
"@components/(.*)$": "<rootDir>/src/components/$1",
"@resources/(.*)$": "<rootDir>/src/resources/$1",
// https://jestjs.io/docs/webpack
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/.tests/__mocks__/file-mock.js",
"\\.(css|less|scss|sass)$": "<rootDir>/.tests/__mocks__/style-mock.js",
},
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(tsx?)$",
transformIgnorePatterns: ["\\\\node_modules\\\\"],
};