-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
20 lines (20 loc) · 763 Bytes
/
jest.config.js
File metadata and controls
20 lines (20 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module.exports = {
roots: ['<rootDir>'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'jsx'],
testPathIgnorePatterns: ['<rootDir>[/\\\\](node_modules|.next)[/\\\\]'],
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(ts|tsx)$'],
transform: {
'^.+\\.stories\\.tsx$': '@storybook/addon-storyshots/injectFileName',
'^.+\\.(js|ts|tsx)$': 'babel-jest',
},
testMatch: ['<rootDir>/**/?(*.)(spec|test).(ts|js)?(x)'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
moduleNameMapper: {
'\\.(styl|css|less|scss)$': '<rootDir>/test/__mocks__/styleMock.js',
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/test/__mocks__/fileMock.js',
},
moduleDirectories: ['node_modules', 'src'],
}