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
I was trying to add the "binding" to expect.addSnapshotSerializer() in bs-jest and I found creating too much crap for this particular case.
How it works it's simple, while expect.extend adds prototype methods to the matches, expect.addSnapshotSerializer adds transformations to the snapshots and both methods are called once on top of the file (or in any setup.js file)
Hey. Sorry for the late response. It's a bit of a chore just to get into this as I don't even use bs-jest regularly these days.
I think you could just implement this as a standalone binding though. Noe need to involve any of the existing stuff. Just put an ordinary external in the Expect module, and that's that. Or am I missing something?
Hey @glennsl
I was trying to add the "binding" to
expect.addSnapshotSerializer()
in bs-jest and I found creating too much crap for this particular case.How it works it's simple, while expect.extend adds prototype methods to the matches, expect.addSnapshotSerializer adds transformations to the snapshots and both methods are called once on top of the file (or in any setup.js file)
That's a valid serializer:
So, a serializer it's a
But I end up adding addSnapshotSerializer to the prototype with the affirm. Would you mind some advice on how to add it without too much hassle?
Thanks!
The text was updated successfully, but these errors were encountered: