Skip to content

Commit a748549

Browse files
committed
chore: jest 상대경로 추가
1 parent 2d5210b commit a748549

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/jest.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Config } from "jest";
2-
2+
const path = require("path");
33
const config: Config = {
44
moduleFileExtensions: ["js", "json", "ts"],
55
rootDir: ".",
@@ -22,9 +22,10 @@ const config: Config = {
2222
extensionsToTreatAsEsm: [".ts"],
2323
moduleNameMapper: {
2424
"^@noctaCrdt$": "<rootDir>/../@noctaCrdt/dist/src/Crdt.js",
25-
"^@noctaCrdt/(.*)$": "<rootDir>/../@noctaCrdt/dist/src/$1.js",
25+
"^@noctaCrdt/(.*)$": path.join(__dirname, "../@noctaCrdt/dist/src/$1"),
2626
"^nanoid$": require.resolve("nanoid"),
2727
},
28+
modulePaths: [path.join(__dirname, ".."), "node_modules"],
2829
};
2930

3031
export default config;

0 commit comments

Comments
 (0)