-
-
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 each array validation check #7033
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7033 +/- ##
==========================================
- Coverage 66.95% 66.86% -0.09%
==========================================
Files 250 250
Lines 10430 10460 +30
Branches 4 4
==========================================
+ Hits 6983 6994 +11
- Misses 3446 3465 +19
Partials 1 1
Continue to review full report at Codecov.
|
@@ -23,12 +23,31 @@ const SUPPORTED_PLACEHOLDERS = /%[sdifjoOp%]/g; | |||
const PRETTY_PLACEHOLDER = '%p'; | |||
const INDEX_PLACEHOLDER = '%#'; | |||
|
|||
const errorWithStack = (message, callsite) => { |
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.
could possibly stick this in jest-util or something, we do it all over the place
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'll make that refactor in a separate PR
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`jest-each .describe throws an error when not called with an array 1`] = ` | ||
"\`.each\` must be called with an Array or Tagged Template String. |
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.
should we have a "was called with" thing?
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.
just added it :)
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
jest-each
array table validation check. Related issue #6888 and #6888 (comment)Test plan
Unit test