Skip to content

Commit ba97453

Browse files
committed
fix: error jest cannot locate index file, solve with add moduleNameMapper
1 parent d651597 commit ba97453

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jest.config.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ module.exports = {
33
rootDir: "src",
44
testEnvironment: "node",
55
testRegex: ".test.ts$",
6+
moduleNameMapper: {
7+
"^@/(.*)$": "<rootDir>/$1",
8+
},
69
transform: {
710
"^.+\\.(t|j)s$": "ts-jest",
811
},

0 commit comments

Comments
 (0)