forked from KellisLab/MantisExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
23 lines (23 loc) · 756 Bytes
/
jest.config.cjs
File metadata and controls
23 lines (23 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/** @type {import('jest').Config} */
module.exports = {
preset: 'ts-jest/presets/js-with-ts-esm',
testEnvironment: 'jsdom',
extensionsToTreatAsEsm: ['.ts', '.tsx'],
moduleNameMapper: {
"~/(.*)": "<rootDir>/src/$1",
"\\.(css|less|scss|sass)$": "<rootDir>/__mocks__/style.mock.js",
"\\.(gif|ttf|eot|svg|png)$": "<rootDir>/__mocks__/file.mock.js"
},
transform: {
"^.+\\.(jsx|tsx|ts|js)?$": ["babel-jest", {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-react',
'@babel/preset-typescript'
]
}]
},
transformIgnorePatterns: [],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts']
};