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 primitive pretty printing #7694

Merged
merged 8 commits into from
Jan 25, 2019

Conversation

mattphillips
Copy link
Contributor

Summary

Closes: #7689

Test plan

  • Updated tests for this use case

Copy link
Contributor

@jeysal jeysal left a comment

Choose a reason for hiding this comment

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

That was quick 👍 LGTM, one nit :)

packages/jest-each/src/bind.js Outdated Show resolved Hide resolved
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

Great!

packages/jest-each/src/bind.js Outdated Show resolved Hide resolved
packages/jest-each/src/bind.js Outdated Show resolved Hide resolved
packages/jest-each/package.json Outdated Show resolved Hide resolved
e2e/__tests__/__snapshots__/each.test.js.snap Outdated Show resolved Hide resolved
@codecov-io
Copy link

Codecov Report

Merging #7694 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7694      +/-   ##
==========================================
+ Coverage   68.27%   68.28%   +0.01%     
==========================================
  Files         251      251              
  Lines        9667     9671       +4     
  Branches        5        5              
==========================================
+ Hits         6600     6604       +4     
  Misses       3065     3065              
  Partials        2        2
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 6de22dd...4ad8e35. Read the comment docs.

Copy link
Contributor

@rubennorte rubennorte left a comment

Choose a reason for hiding this comment

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

Just some minor suggestions. Looks good. Thanks!

e2e/each/__tests__/failure.test.js Outdated Show resolved Hide resolved
@@ -23,6 +24,13 @@ const RECEIVED_COLOR = chalk.red;
const SUPPORTED_PLACEHOLDERS = /%[sdifjoOp%]/g;
const PRETTY_PLACEHOLDER = '%p';
const INDEX_PLACEHOLDER = '%#';
const PRIMITIVES = new Set([
Copy link
Contributor

Choose a reason for hiding this comment

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

Not blocking at all, but we might consider moving this to jest-get-types (e.g.: isPrimitiveType(getType(value))).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rubennorte yup good shout, I'll send another PR for this change so we can merge this PR in the meantime :)

@SimenB SimenB merged commit 6081f7a into jestjs:master Jan 25, 2019
captain-yossarian pushed a commit to captain-yossarian/jest that referenced this pull request Jul 18, 2019
@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.

Why test.each table-variable for string data type, has double quotes?
6 participants