We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b26b56b commit b688d2fCopy full SHA for b688d2f
jest.config.js
@@ -1,3 +1,6 @@
1
+const {pathsToModuleNameMapper} = require('ts-jest');
2
+const {compilerOptions} = require('./tsconfig.json');
3
+
4
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
5
// eslint-disable-next-line no-undef
6
module.exports = {
@@ -6,6 +9,7 @@ module.exports = {
9
testPathIgnorePatterns: ['spec.js', 'spec.ts'],
7
10
setupFilesAfterEnv: ['<rootDir>tests/setup.ts'],
8
11
moduleNameMapper: {
12
+ ...pathsToModuleNameMapper(compilerOptions.paths, {prefix: '<rootDir>/'}),
13
'\\.(css|less|scss|sss|styl)$': '<rootDir>/node_modules/jest-css-modules',
14
'.+\\.(svg|png|jpg)$': 'identity-obj-proxy',
15
},
0 commit comments