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

mattphillips
Copy link
Contributor

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 April 8, 2019 21:04
@codecov-io
Copy link

codecov-io 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.

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.

nice!

@mattphillips
Copy link
Contributor Author

@scotthovestadt @SimenB can this be merged?

@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 11, 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.

Test arguments are skipped during title parameter injection
5 participants