-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: Support accessing attributes in name interpolation #6452
Comments
Hey @jackwilsdon I really like this idea. I've gone ahead and implemented this over in #6457 with a slightly different syntax. Instead of: I've gone with: Feel free to give feedback on the PR 😄 |
BTW @jackwilsdon if you are using Jest@23 you can now use |
@mattphillips great! Much appreciated 😁. The reason I suggested the I understand that's not the best example in the world, but I'm sure you get the idea. Cheers! 🎉 |
Is there a special syntax to print the value of something like |
Have you tried |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🚀 Feature Proposal
jest-each
should support accessing attributes on objects when generating a description for a test.For example;
Admittedly this is not a great example, but I'm sure you can get the idea.
Motivation
I came across this whilst trying to test my Redux reducers using
jest-each
;This would be a useful feature, as it would allow generation of descriptions for tests using object variables.
Example
See motiviation.
Pitch
Why does this feature belong in the Jest core platform?
It is an extension of an existing piece of functionality which can't be easily added (unless I'm missing something) without forking the library.
The text was updated successfully, but these errors were encountered: