-
Notifications
You must be signed in to change notification settings - Fork 31
/
jest.config.js
32 lines (30 loc) · 957 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
24
25
26
27
28
29
30
31
32
// @ts-check
/** @typedef {import('jest').Config} JestConfig **/
/** @type JestConfig */
const config = {
coverageDirectory: "coverage",
coverageReporters: ["text", "clover", "github-actions"],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
transform: {
"^.+\\.tsx?$": "<rootDir>/esbuild.jest.js",
},
moduleFileExtensions: ["ts", "tsx", "js"],
moduleNameMapper: {
"^nanoid$": require.resolve("nanoid"),
"^.+\\.(css|scss)$": "<rootDir>/jest/identity-mapper.ts",
},
roots: ["./packages", "./portal"],
testPathIgnorePatterns: ["/packages/jokul/"],
testEnvironment: "jsdom",
setupFiles: ["jest-canvas-mock"],
setupFilesAfterEnv: ["./jest/setupTests.ts"],
watchPlugins: ["jest-watch-typeahead/filename", "jest-watch-typeahead/testname"],
};
module.exports = config;