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] Add each array validation check #7033

Merged
merged 3 commits into from
Sep 23, 2018

Conversation

mattphillips
Copy link
Contributor

Summary

Add jest-each array table validation check. Related issue #6888 and #6888 (comment)

Test plan

Unit test

@codecov-io
Copy link

Codecov Report

Merging #7033 into master will decrease coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

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

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 37caedd...2efc1e8. Read the comment docs.

@@ -23,12 +23,31 @@ const SUPPORTED_PLACEHOLDERS = /%[sdifjoOp%]/g;
const PRETTY_PLACEHOLDER = '%p';
const INDEX_PLACEHOLDER = '%#';

const errorWithStack = (message, callsite) => {
Copy link
Member

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

Copy link
Contributor Author

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

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just added it :)

@SimenB SimenB merged commit e2ebcd0 into jestjs:master Sep 23, 2018
@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.

4 participants