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.
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
test: amountToHangul 테스트 추가 #135
test: amountToHangul 테스트 추가 #135
Changes from 3 commits
f501224
8f72144
3675cd1
4f7a721
5ba6490
60bc00f
0db609b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 프로젝트에서 사용하는 vitest가 제공해주는
toThrow
메서드가 아닌, assert를 사용하면 어떠한 이점이 있나요?제가 생각한건 다음과 같아요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
특별한 이점은 없고
combineHangulCharacter.spec.ts
,hangul.spec.ts
에서 node 기본 모듈인 assert의throws
메서드를 사용하다보니 동일하게 사용하려고 했습니다. vitest에서 제공해주는toThrow
메서드를 사용하는 것이 일관성이 있을 것 같아요 !combineHangulCharacter.spec.ts
,hangul.spec.ts
에서도assert.throws
대신toThrow
메서드를 사용하도록 변경되면 좋을 것 같은데 추가로 PR 올려도 괜찮을까요 ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@okinawaa 님 이건 좀 다른 주제이긴 한데요. vitest에서 제공하는
toThrow
는toThrowError
의 별칭인데요. 현재 테스트 코드 대다수에서toThrowError
를 사용하고 있는데 하나로 통일하여 일관성을 지키는게 좋지 않을까 싶은데 어떠신가요?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vitest-dev/vitest#2570
두 메서드는 동일하지만 error를 테스트할때
toThrowError
를 사용하는 것이 직관적이겠네요 !