-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjest.config.js
More file actions
37 lines (37 loc) · 1.08 KB
/
jest.config.js
File metadata and controls
37 lines (37 loc) · 1.08 KB
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
module.exports = {
roots: ["<rootDir>"],
testEnvironment: "jsdom",
moduleFileExtensions: ["ts", "tsx", "js", "json", "jsx"],
testPathIgnorePatterns: ["<rootDir>[/\\\\](node_modules|.next)[/\\\\]"],
transformIgnorePatterns: ["[/\\\\]node_modules[/\\\\].+\\.(ts|tsx)$"],
transform: {
"^.+\\.(ts|tsx)$": "babel-jest",
},
watchPlugins: [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname",
],
moduleNameMapper: {
"\\.(css|less|sass|scss)$": "identity-obj-proxy",
"\\.(gif|ttf|eot|svg|png)$": "<rootDir>/src/utils/testUtils/fileMock.ts",
},
setupFilesAfterEnv: ["<rootDir>/src/utils/testUtils/setupTests.ts"],
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!**/*.d.ts",
"!node_modules",
"!src/**/?(*.)stories.{ts,tsx}",
"!src/**/?(*.)test.{ts,tsx}",
"!src/**/index.{ts,tsx}",
"!src/types/*",
"!src/reportWebVitals.ts",
"!src/serviceWorker.ts",
"!.next",
"!cypress",
"!.storybook",
"!src/**/_app.page.tsx",
"!src/utils/testUtils",
"!src/utils/storybook",
"!src/**/_document.page.tsx",
],
}