-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
25 lines (25 loc) · 851 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
module.exports = {
setupFiles: ['<rootDir>/jest.setup.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/node_modules/', '<rootDir>/.next/'],
moduleNameMapper: {
'\\.(css|less)$': 'identity-obj-proxy',
'^config(.*)$': '<rootDir>/config$1',
'^src(.*)$': '<rootDir>/src$1',
'^server(.*)$': '<rootDir>/server$1',
'^pages(.*)$': '<rootDir>/pages$1',
},
transform: {
'^.+\\.stories\\.[tj]sx?$': '@storybook/addon-storyshots/injectFileName',
'^.+\\.[tj]sx?$': 'babel-jest',
},
collectCoverageFrom: [
'./{src,server}/**/*.{ts,tsx,js,jsx}',
'!**/node_modules/**',
'!**/dist/**',
'!**/coverage/**',
'!**/*.stories.{ts,tsx,js,jsx}',
'!**/{config,constants,styles,types,__fixtures__}/**',
],
watchPathIgnorePatterns: ['dist'],
}