-
-
Notifications
You must be signed in to change notification settings - Fork 393
Expand file tree
/
Copy pathjest.config.js
More file actions
20 lines (20 loc) · 697 Bytes
/
jest.config.js
File metadata and controls
20 lines (20 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
// Map asset and CSS imports to inert mocks.
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/src/__mocks__/fileMock.js',
'\\.(css|less)$': '<rootDir>/src/__mocks__/styleMock.js'
},
preset: 'ts-jest/presets/js-with-ts',
resetMocks: true,
roots: ['<rootDir>/src'],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
testEnvironment: 'jest-environment-jsdom',
// segseg is a ESM-only module.
transformIgnorePatterns: ['node_modules/(?!segseg)'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
]
};