-
Notifications
You must be signed in to change notification settings - Fork 6
/
jest.config.js
26 lines (22 loc) · 976 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
26
module.exports = {
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
snapshotSerializers: ['enzyme-to-json/serializer'],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/generators/'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
moduleDirectories: ['node_modules', 'src'],
modulePaths: ['src'],
// This fixed an error related to the CSS and loading gif breaking
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|scss|css)$':
'<rootDir>/src/core/__mocks__/fileMock.ts',
'ContainersProvider.tsx$': '<rootDir>/src/core/__mocks__/fileMock.ts',
},
mapCoverage: true,
coverageDirectory: '<rootDir>/coverage',
collectCoverageFrom: ['**/src/**/*.{ts,tsx}', '!**/loader.{ts,tsx}', '!**/node_modules/**'],
coveragePathIgnorePatterns: ['.*\\.d\\.ts'],
};