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

feat(jest-each): add support for interpolation with object properties #11388

Conversation

frozenbonito
Copy link
Contributor

Summary

close #10394

$variables are interpolated if the test name doesn't contain any of the printf placeholders (please refer to #10394 (comment) and #10394 (comment)).

Test plan

Add unit tests.

@frozenbonito frozenbonito force-pushed the add-support-interpolation-with-object-properties branch from 069b42a to c6de1fc Compare May 8, 2021 05:25
@frozenbonito frozenbonito force-pushed the add-support-interpolation-with-object-properties branch from c6de1fc to 5d1d65b Compare May 8, 2021 06:30
@codecov-commenter
Copy link

Codecov Report

Merging #11388 (5d1d65b) into master (705af68) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11388      +/-   ##
==========================================
- Coverage   64.20%   64.20%   -0.01%     
==========================================
  Files         308      309       +1     
  Lines       13519    13524       +5     
  Branches     3293     3295       +2     
==========================================
+ Hits         8680     8683       +3     
- Misses       4125     4126       +1     
- Partials      714      715       +1     
Impacted Files Coverage Δ
packages/jest-each/src/table/template.ts 100.00% <ø> (ø)
packages/jest-each/src/table/array.ts 100.00% <100.00%> (ø)
packages/jest-each/src/table/interpolation.ts 100.00% <100.00%> (ø)
packages/expect/src/utils.ts 94.83% <0.00%> (-1.30%) ⬇️

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 705af68...5d1d65b. 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.

thanks! this is really good stuff 👍

@SimenB SimenB merged commit b7c968a into jestjs:master May 8, 2021
@frozenbonito frozenbonito deleted the add-support-interpolation-with-object-properties branch May 8, 2021 16:55
@github-actions
Copy link

github-actions bot commented Jun 8, 2021

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 Jun 8, 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.each should perform string interpolation with object properties
4 participants