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.
🚀 Feature Proposal
Similar to https://github.com/jestjs/jest/issues/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 https://github.com/jestjs/jest/issues/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 https://github.com/jestjs/jest/issues/10730 was added