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

[jest-each] Fix pluralising missing arguments error #6369

Merged
merged 4 commits into from
Jun 2, 2018

Conversation

mattphillips
Copy link
Contributor

Summary

Add pluralise to missing arguments error

Test plan

Add e2e test

true,
]

Missing 2 arguments
Copy link
Collaborator

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?

Copy link
Contributor Author

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) =>
Copy link
Collaborator

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?

Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Collaborator

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))
Copy link
Member

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 #

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

@codecov-io
Copy link

Codecov Report

Merging #6369 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
packages/jest-each/src/bind.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aff9681...83c7bd8. Read the comment docs.

@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants