-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
28 lines (26 loc) · 862 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
25
26
27
28
import type { Config } from '@jest/types';
const config: Config.InitialOptions = {
roots: ["<rootDir>"],
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/*.d.ts",
],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testEnvironment: "jsdom",
modulePaths: ["<rootDir>"],
transform: {
"^.+\\.(ts|tsx|jsx)$": "ts-jest",
},
transformIgnorePatterns: [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$",
"^.+\\.module\\.(css|sass|scss)$",
],
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/jest/__mocks__/fileMock.js",
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy",
"\\.(css|less|scss)$": "identity-obj-proxy",
"components/(.*)": '<rootDir>src/components/$1',
},
resetMocks: true,
};
export default config;