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

Be/feature/#598 사용자 api 및 서비스 구현 #599

Merged
merged 18 commits into from
Mar 6, 2024

Conversation

kimyu0218
Copy link
Collaborator

@kimyu0218 kimyu0218 commented Mar 6, 2024

🔮 resolved #598

변경 사항

1️⃣ 쿠키 정보(jwt)를 바탕으로 사용자 정보 조회하기

  • 서비스 및 컨트롤러 작성
  • 테스트 작성
  • swagger 작성

2️⃣ 단위 테스트, e2e 테스트를 위한 설정 중복 해결

  • 공통 설정 정보가 담긴 jest.config.json 작성
  • 단위 테스트를 위한 설정 파일을 불러오는 jest-unit.config.js 작성
  • e2e 테스트를 위한 설정 파일을 불러오는 jest-e2e.config.js 작성
const commonJestConfig = require('./jest.config.json'); // 공통 설정 불러오기

module.exports = (target) => {
  if (target === 'unit') { // for 단위 테스트
    return {
      ...commonJestConfig,
      testRegex: '.*\\.spec\\.ts$',
    };
  }
  if (target === 'e2e') { // for e2e 테스트
    return {
      ...commonJestConfig,
      testRegex: '.e2e-spec.ts$',
    };
  }
  return commonJestConfig;
};

고민과 해결 과정

(선택) 테스트 결과

{
  "nickname": "타로밀크티", // 필수항목
  "profileUrl": "https://kr.object.ncloudstorage.com/magicconch/basic/0.jpg", // 선택항목 (undefined 가능)
}

@kimyu0218 kimyu0218 marked this pull request as ready for review March 6, 2024 10:35
Comment on lines +3 to +11
export const MEMBERS_CODEMAP: ExceptionCodemap = {
NOT_FOUND: {
status: 404,
message: '사용자를 찾을 수 없습니다.',
code: 'MME001',
description:
'해당 이메일에 해당하는 사용자가 존재하지 않습니다. 쿠키에 들어있는 email, providerId가 올바른지 확인해주세요.',
},
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 👍 👍

@kimyu0218 kimyu0218 merged commit b4bbdd1 into dev Mar 6, 2024
@kimyu0218 kimyu0218 deleted the BE/feature/#598-사용자-API-및-서비스-구현 branch March 6, 2024 11:45
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.

✅ 사용자 API 및 서비스 구현
3 participants