-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[jest-each] Fix pluralising missing arguments error #6369
Conversation
true, | ||
] | ||
|
||
Missing 2 arguments |
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.
How about using snapshot-diff
to only check the difference?
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.
Do we use this already in core?
@@ -98,3 +103,6 @@ const applyObjectParams = (obj: any, test: Function) => { | |||
|
|||
return () => test(obj); | |||
}; | |||
|
|||
const pluralize = (word: string, count: number) => |
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.
How about using pluralize from jest-matcher-utils
?
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.
Not sure if it's worth to import whole package though
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.
Yeah it didn't seem worth it for such a small function
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.
nope
CHANGELOG.md
Outdated
@@ -12,7 +12,8 @@ | |||
|
|||
### Fixes | |||
|
|||
- `[jest-each]` Stop test title concatenating extra args ([##6346](https://github.com/facebook/jest/pull/#6346)) | |||
- `[jest-each]` Fix pluralising missing arguments error ([#6369](https://github.com/facebook/jest/pull/#6369)) | |||
- `[jest-each]` Stop test title concatenating extra args ([#6346](https://github.com/facebook/jest/pull/#6346)) |
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.
the link should not have the #
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!
Codecov Report
@@ Coverage Diff @@
## master #6369 +/- ##
==========================================
+ Coverage 63.47% 63.48% +<.01%
==========================================
Files 227 227
Lines 8677 8679 +2
Branches 4 3 -1
==========================================
+ Hits 5508 5510 +2
Misses 3168 3168
Partials 1 1
Continue to review full report at Codecov.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Add pluralise to missing arguments error
Test plan
Add e2e test