generated from timelessco/react-components-template
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathjest.config.ts
24 lines (23 loc) · 933 Bytes
/
jest.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
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/en/configuration.html
*/
const { join } = require("path");
const pkg = require("./package.json");
// eslint-disable-next-line import/no-anonymous-default-export
export default {
rootDir: __dirname,
displayName: pkg.name,
testEnvironment: "jsdom",
testMatch: [join(__dirname, "src/**/*.test.{js,ts,tsx}")],
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
moduleNameMapper: {
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/src/__mocks__/fileMock.js",
"\\.(css|less|sass|scss)$": "<rootDir>/src/__mocks__/styleMock.js",
"^@shared(.*)$": "<rootDir>/shared$1",
},
coveragePathIgnorePatterns: ["node_modules", "__mocks__", "stories"],
clearMocks: true,
transformIgnorePatterns: ["<rootDir>/node_modules/(?!lodash-es)"],
};