From be71d881e485ee9076450b0758f79836eef17907 Mon Sep 17 00:00:00 2001 From: kangchanghan Date: Wed, 1 May 2024 14:20:18 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20Jest=20Path=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - package.json - Jest를 위한 Path alias 추가 - moduleNameMapper --- backend/package.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 3c347f12..b0fa1a93 100644 --- a/backend/package.json +++ b/backend/package.json @@ -98,7 +98,25 @@ "**/*.(t|j)s" ], "coverageDirectory": "../coverage", - "testEnvironment": "node" + "testEnvironment": "node", + "moduleNameMapper": { + "^@src/(.*)$": "/$1", + "^@config/(.*)$": "/config/$1", + "^@utils/(.*)$": "/utils/$1", + "^@enum/(.*)$": "/enum/$1", + "^@constants/(.*)$": "/constants/$1", + "^@modules/(.*)$": "/modules/$1", + "^@auth/(.*)$": "/modules/authModules/auth/$1", + "^@user/(.*)$": "/modules/userModules/user/$1", + "^@group/(.*)$": "/modules/userModules/group/$1", + "^@chat/(.*)$": "/modules/userModules/chat/$1", + "^@brand/(.*)$": "/modules/themeModules/brand/$1", + "^@branch/(.*)$": "/modules/themeModules/branch/$1", + "^@crawlerUtils/(.*)$": "/modules/themeModules/crawlerUtils/$1", + "^@theme/(.*)$": "/modules/themeModules/theme/$1", + "^@diary/(.*)$": "/modules/diaryModules/diary/$1", + "^@comment/(.*)$": "/modules/diaryModules/comment/$1" + } }, "lint-staged": { "*.{js,ts}": [