-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.js
More file actions
31 lines (29 loc) · 843 Bytes
/
jest.config.js
File metadata and controls
31 lines (29 loc) · 843 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
28
29
30
31
const {pathsToModuleNameMapper} = require('ts-jest/utils')
const {compilerOptions} = require('./tsconfig')
module.exports = {
projects: ['<rootDir>/src', '<rootDir>/api'],
moduleDirectories: ['node_modules', __dirname],
collectCoverageFrom: [
'**/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/*.stories.{js,jsx,ts,tsx}',
],
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
'^.+\\.svg$': 'jest-svg-transformer',
},
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths),
'^.+\\.css$': 'jest-css-modules',
},
transformIgnorePatterns: [
'/node_modules/',
'^.+\\.module\\.(css|sass|scss)$',
],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
}