-
Notifications
You must be signed in to change notification settings - Fork 316
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(invariant): add test code #789
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #789 +/- ##
=======================================
Coverage 99.11% 99.11%
=======================================
Files 305 305
Lines 2727 2727
Branches 800 800
=======================================
Hits 2703 2703
Misses 23 23
Partials 1 1 |
Actually it is common practice to write code like |
@raon0211
|
Yeah, the test code will definitely help. In the meantime, I thought using |
@raon0211 It would be nice to have a name that encompasses both, since it can take a So, I'm going to keep the existing code and just add the test code. |
ea17632
to
1a8c087
Compare
@raon0211 I reverted the existing modifications, leaving only the test code. Thanks for the review. 🤗 |
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.
Thanks!
The first argument of the
invariant
function is namedcondition
, and given the use case, it would be nice to define it as aboolean
type, what do you think?Is there a reason why the type is
unknown
?I additionally added test code for type narrowing for the
invariant
function.