You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #10730 this is a request for assertion output to not include the "Array" and "Object" names from assertion output diff
Motivation
Instead of using toMatchInlineSnapshot I use the regular value assertions e.g. toEqual and in some cases where I know some current behaviour is correct, I run the test with an empty value e.g. an empty object or something, then copy the assertion failure diff as the new expectation.
The issue is that the assertion failure diff requires formatting, e.g. removing the "+" characters, which is acceptable, but in some cases I also need to remove the inline prototype names that are added.
It would be good if there was an option like exists for snapshots to turn this off for some values in the same way as done in #10730
🚀 Feature Proposal
Similar to #10730 this is a request for assertion output to not include the "Array" and "Object" names from assertion output diff
Motivation
Instead of using
toMatchInlineSnapshot
I use the regular value assertions e.g.toEqual
and in some cases where I know some current behaviour is correct, I run the test with an empty value e.g. an empty object or something, then copy the assertion failure diff as the new expectation.The issue is that the assertion failure diff requires formatting, e.g. removing the "+" characters, which is acceptable, but in some cases I also need to remove the inline prototype names that are added.
It would be good if there was an option like exists for snapshots to turn this off for some values in the same way as done in #10730
Example
From this assertion
the output is:
the "Set" is acceptable, but ideally an option for "Object" and "Array" to not be shown would be good
Pitch
For similar reasons #10730 was added
The text was updated successfully, but these errors were encountered: