Merged
Conversation
Collaborator
Author
|
f-lab-namu
approved these changes
Jan 5, 2026
…o feature/FileUpload
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


개요
업로드된 파일이
package.json형식의 의존성 관리 파일인지 판별하는FileUploadService에 대한 단위 테스트 코드를 추가했습니다.주요 테스트 내용
createMockFile유틸 함수를 통해 Nest.js 환경에서 업로드 파일(Express.Multer.File)을 모킹하여 테스트에 활용했습니다.isJsonExtension에서.json확장자인지 여부를 검사하고,.json이면true, 그 외 확장자는false를 반환하는지 테스트했습니다.isPackageJsonFileName이 파일명이 정확히package.json일 때만true를 반환하고,package-lock.json등 다른 이름일 경우false를 반환하는지 검증했습니다.parseJson이 유효한 JSON 문자열일 경우 파싱된 객체를, 잘못된 JSON일 경우null을 반환하는지 테스트했습니다.hasDependencies가dependencies또는devDependencies가 존재하면true, 둘 다 없거나null/undefined일 경우false를 반환하는지 다양한 케이스로 검증했습니다.isPackageJson이 다음 조건을 모두 만족할 때만true를 반환하는지 통합적으로 확인했습니다..json일 것package.json일 것dependencies또는devDependencies중 하나 이상 존재할 것