-
-
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]: Add empty string/array validation check #7249
Conversation
Nice! This works for test.each``('bla', () => {}); as well? |
And test.each`
a | b | expected
`('bla', () => {}); ? |
Codecov Report
@@ Coverage Diff @@
## master #7249 +/- ##
==========================================
+ Coverage 66.55% 66.57% +0.01%
==========================================
Files 237 237
Lines 9317 9321 +4
Branches 3 3
==========================================
+ Hits 6201 6205 +4
Misses 3115 3115
Partials 1 1
Continue to review full report at Codecov.
|
packages/jest-each/src/bind.js
Outdated
tableArg[0].trim() === '' | ||
) { | ||
const error = new ErrorWithStack( | ||
'Error: `.each` called with an empty tagged template string of table data.\n', |
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.
I think it's called "tagged template literal"
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.
good spot!
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
Motivation: @SimenB's #7100 (comment)
Test plan