-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.ts
36 lines (34 loc) · 1009 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
29
30
31
32
33
34
35
36
import type { Config } from '@jest/types';
const jestConfig: Config.InitialOptions = {
automock: false,
clearMocks: false,
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/types/**',
'!**/*.d.ts',
'!coverage/**',
'!.next/**',
'!**/node_modules/**',
],
coverageDirectory: 'coverage',
coverageProvider: 'v8',
globalSetup: '<rootDir>/test/jest.globalSetup.ts',
moduleDirectories: ['node_modules', '<rootDir>'],
moduleNameMapper: {
'.+\\.css$': 'identity-obj-proxy',
},
roots: ['<rootDir>/test', '<rootDir>/src'],
setupFilesAfterEnv: ['<rootDir>/test/jest.setupAfterEnv.ts'],
testEnvironment: 'jsdom',
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.css$': '<rootDir>/test/css.transform.js',
},
transformIgnorePatterns: [
'/node_modules/',
'^.+\\.module\\.(css|sass|scss)$',
],
};
export default jestConfig;