-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
27 lines (27 loc) · 824 Bytes
/
jest.config.js
File metadata and controls
27 lines (27 loc) · 824 Bytes
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
/* eslint-env node */
/* eslint no-undef: off */
export default {
testEnvironment: 'node',
transform: {
'^.+\\.(js|jsx|ts|tsx)$': [
'babel-jest',
{
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
plugins: ['@babel/plugin-syntax-import-meta'],
},
],
},
moduleFileExtensions: ['js', 'jsx', 'json', 'node'],
testMatch: ['**/src/__tests__/unit/**/*.test.js'],
setupFilesAfterEnv: ['<rootDir>/src/__tests__/setup.js'],
collectCoverage: false,
coverageDirectory: '<rootDir>/coverage',
coveragePathIgnorePatterns: ['/node_modules/', '/__tests__/'],
verbose: true,
testPathIgnorePatterns: ['/node_modules/'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
transformIgnorePatterns: ['/node_modules/(?!@babel)'],
rootDir: '.',
};