-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
Description
🚀 Feature Proposal
Provide a default set of plugins to jest-each's use of pretty-format.
Motivation
jest-snapshot provides a default set of plugins to pretty-format, which are used during formatting of expect().toMatchSnapshot().
jest-each also uses pretty-format to format programmatic test titles (added in #6357), but does not provide any plugins to pretty-format. So, for example, something like this doesn't work:
test.each([
<Button />,
<Button active />,
])('renders %p', element => {
// ... test goes here
})Because pretty-format isn't invoked with the ReactElement plugin.
It would be nice if it was invoked with the same set of default plugins as in jest-snapshot.
Example
See above.
Pitch
Why does this feature belong in the Jest core platform?
For consistency between jest-snapshot and jest-each.
brebory