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
@mattalexx (As a "workaround") You can do inline snapshots with the snapshotDiff and toMatchInlineSnapshot function.
For example, the following would generate an inline snapshot:
test('snapshot difference between 2 React components state',()=>{expect(snapshotDiff(<Componenttest="say"/>,<Componenttest="my name"/>)).toMatchInlineSnapshot();});
I think it makes sense to provide a custom matcher though, since it's a cleaner API. This does not seem too hard -- I can submit a pull request for it. Hopefully this project is still being maintained and someone can release a new version though? cc: @thymikee
domsli
added a commit
to domsli/snapshot-diff
that referenced
this issue
Mar 13, 2022
Would be nice to have inline snapshots for this library.
The text was updated successfully, but these errors were encountered: