Skip to content

Commit 382cfd2

Browse files
Minor fix to ts-jest moduleNameMapper configuration.
1 parent be9970b commit 382cfd2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jest.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
preset: "ts-jest",
33
testEnvironment: "node",
44
moduleNameMapper: {
5-
"src/(.*)": "<rootDir>/src/$1",
5+
"^src/(.*)": "<rootDir>/src/$1",
66
obsidian: "<rootDir>/mocks/obsidian.ts",
77
},
88
globals: {
@@ -11,7 +11,7 @@ module.exports = {
1111
},
1212
},
1313
transform: {
14-
'\\.ts$': ['ts-jest'],
15-
'\\.ya?ml$': 'jest-raw-loader',
16-
}
14+
"\\.ts$": ["ts-jest"],
15+
"\\.ya?ml$": "jest-raw-loader",
16+
},
1717
};

0 commit comments

Comments
 (0)