Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config/BE/#477: 테스트(Jest)를 위한 Path 설정 추가 #478

Merged
merged 1 commit into from
May 2, 2024

Conversation

Capoomaru
Copy link
Collaborator

🤷‍♂️ Description

테스트 환경을 위한 path 설정이 필요했어요.
이를 위해 path 설정을 추가해요.
도입기 - 테스트 코드 path 설정-Notion

📝 Primary Commits

  • package.jsonmoduleNameMapper를 추가해줘요.
    • 기존에 tsconfig.json에 설정된 paths를 모두 추가
      {
        "moduleNameMapper": {
          "^@src/(.*)$": "<rootDir>/$1",
          "^@config/(.*)$": "<rootDir>/config/$1",
          "^@utils/(.*)$": "<rootDir>/utils/$1",
          "^@enum/(.*)$": "<rootDir>/enum/$1",
          "^@constants/(.*)$": "<rootDir>/constants/$1",
          "^@modules/(.*)$": "<rootDir>/modules/$1",
          "^@auth/(.*)$": "<rootDir>/modules/authModules/auth/$1",
          "^@user/(.*)$": "<rootDir>/modules/userModules/user/$1",
          "^@group/(.*)$": "<rootDir>/modules/userModules/group/$1",
          "^@chat/(.*)$": "<rootDir>/modules/userModules/chat/$1",
          "^@brand/(.*)$": "<rootDir>/modules/themeModules/brand/$1",
          "^@branch/(.*)$": "<rootDir>/modules/themeModules/branch/$1",
          "^@crawlerUtils/(.*)$": "<rootDir>/modules/themeModules/crawlerUtils/$1",
          "^@theme/(.*)$": "<rootDir>/modules/themeModules/theme/$1",
          "^@diary/(.*)$": "<rootDir>/modules/diaryModules/diary/$1",
          "^@comment/(.*)$": "<rootDir>/modules/diaryModules/comment/$1"
        }
      }

📷 Screenshots

closes: #477

- package.json
  - Jest를 위한 Path alias 추가
    - moduleNameMapper
Copy link
Collaborator

@JEM1224 JEM1224 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

빠르시네요....!!!! 노션 잘 읽었습니다 !! 😀

@Capoomaru Capoomaru merged commit defd0d8 into dev May 2, 2024
2 checks passed
@Capoomaru Capoomaru deleted the Config/BE/#477 branch May 2, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Config] 테스트를 위한 Path 설정 추가
2 participants