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

test(stackflow): Add id/time Test Code #405

Merged
merged 6 commits into from
Aug 7, 2023

Conversation

ssi02014
Copy link
Contributor

@ssi02014 ssi02014 commented Aug 5, 2023

안녕하세요 👋
core/utils 내부의 id()time() 함수에 대한 테스트 코드를 추가하는 작업을 진행해봤습니다.
적절한 Pull Request인지 검토부탁드립니다 🙏

요약

jest에서 제공해주는 useFakeTimer()를 통해 파일 내의 테스트에 가짜 타이머를 적용 후, setSystemTime()을 통해 현재 시스템 시간을 설정해 time() 함수와 이에 의존하는 id() 함수의 테스트 코드를 작성하였습니다.

테스트 결과

스크린샷 2023-08-06 오전 1 56 42

참고

jest - useFakeTimers
jest - setSystemTime

@vercel
Copy link

vercel bot commented Aug 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stackflow-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2023 8:00am

Copy link
Collaborator

@malangcat malangcat left a comment

Choose a reason for hiding this comment

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

리뷰 코멘트는 Conventional Comments 형식을 따르고 있습니다. 기여해주셔서 감사합니다.

core/src/utils/time.spec.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@malangcat malangcat left a comment

Choose a reason for hiding this comment

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

기여해주셔서 감사합니다.

@malangcat malangcat merged commit 7d906fb into daangn:main Aug 7, 2023
4 checks passed
@ssi02014 ssi02014 deleted the test/stackflow branch August 7, 2023 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants