-
Notifications
You must be signed in to change notification settings - Fork 17
/
jest.config.js
25 lines (24 loc) · 901 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
const config = {
reporters: ['default'],
collectCoverage: true,
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$'],
testURL: 'http://localhost',
transform: {
'^.+\\.(js|jsx|mjs)$': 'babel-jest',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
'^(?!.*\\.(js|jsx|mjs|css|json)$)': '<rootDir>/config/jest/fileTransform.js',
},
moduleFileExtensions: ['web.js', 'mjs', 'js', 'json', 'web.jsx', 'jsx', 'node'],
verbose: true,
testPathIgnorePatterns: ['/node_modules/', 'jest.config.js', '/mock/', '/__mocks__'],
setupFiles: [],
testMatch: ['<rootDir>/__tests__/**/*.test.{js,jsx,mjs}'],
testEnvironment: 'jsdom',
moduleNameMapper: {
'@/(.*)$': '<rootDir>/src/$1',
'~/(.*)$': '<rootDir>/__mocks__/$1',
},
coverageDirectory: '<rootDir>/coverage',
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
};
module.exports = config;