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 bug with placeholder values #8289

Merged
merged 3 commits into from Apr 16, 2019

Conversation

Projects
None yet
5 participants
@mattphillips
Copy link
Collaborator

commented Apr 8, 2019

Summary

Fixes #8286

Basically what is happening is the valid placeholder values are interpolated and then have a knock on effect to the next value to be interpolated into the test title.

This PR stops this from happening by adding an escape to any placeholder values (%d) and then removes the all occurrences of the escape at the end of the formatting

Test plan

See unit tests.

@mattphillips mattphillips requested a review from SimenB Apr 8, 2019

@codecov-io

This comment has been minimized.

Copy link

commented Apr 8, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8289      +/-   ##
==========================================
+ Coverage    62.2%   62.22%   +0.01%     
==========================================
  Files         266      266              
  Lines       10673    10678       +5     
  Branches     2595     2596       +1     
==========================================
+ Hits         6639     6644       +5     
  Misses       3445     3445              
  Partials      589      589
Impacted Files Coverage Δ
packages/jest-each/src/table/array.ts 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 2fc468c...45d9322. Read the comment docs.

@SimenB

SimenB approved these changes Apr 9, 2019

Copy link
Collaborator

left a comment

nice!

@mattphillips

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 16, 2019

@scotthovestadt @SimenB can this be merged?

@SimenB SimenB merged commit 14b7efa into facebook:master Apr 16, 2019

11 checks passed

ci/circleci: lint-and-typecheck Your tests passed on CircleCI!
Details
ci/circleci: test-browser Your tests passed on CircleCI!
Details
ci/circleci: test-jest-circus Your tests passed on CircleCI!
Details
ci/circleci: test-node-10 Your tests passed on CircleCI!
Details
ci/circleci: test-node-11 Your tests passed on CircleCI!
Details
ci/circleci: test-node-6 Your tests passed on CircleCI!
Details
ci/circleci: test-node-8 Your tests passed on CircleCI!
Details
ci/circleci: test-or-deploy-website Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
facebook.jest #20190409.2 succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.