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.
Overview
vitest는 jest와 같이 기본적으로 global API를 활성화하지 않지만 vitest.config에서
globals
옵션을 활성화 할 수 있습니다.이를 통해 각 테스트 파일에 직접
describe
,it
,expect
를 import 해야되는 수고로움을 덜어 테스트 코드를 작성 시 개발자 경험을 향상시킬 수 있을 것 같습니다.추가적으로 typescript와 함께 사용하기위해 tsconfig에
vitest/globals
을 추가 할 수 있습니다.하지만 명시적으로 import 하는 것을 선호할 수 있습니다! 의견주시면 감사드립니다 🤗
https://vitest.dev/config/#globals
PR Checklist