-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
22 lines (22 loc) · 934 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
module.exports = {
roots: ['<rootDir>'],
testEnvironment: 'jsdom',
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'jsx'],
testPathIgnorePatterns: ['<rootDir>[/\\\\](node_modules|.next)[/\\\\]'],
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(ts|tsx)$'],
modulePathIgnorePatterns: ['<rootDir>/cypress/'],
transform: {
'^.+\\.(ts|tsx)$': 'babel-jest',
},
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
moduleNameMapper: {
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/test/__mocks__/fileMock.js',
'^@styles/(.*)$': '<rootDir>/src/styles/$1',
'^@components/(.*)$': '<rootDir>/src/components/$1',
'^@lib/(.*)$': '<rootDir>/src/lib/$1',
'^@customTypes/(.*)$': '<rootDir>/src/customTypes/$1',
'^@helpers/(.*)$': '<rootDir>/src/helpers/$1',
'^@hooks/(.*)$': '<rootDir>/src/hooks/$1',
},
}