When jest.fn()
inside a enzyme ReactWrapper, snapshots get really large
#107
Labels
jest.fn()
inside a enzyme ReactWrapper, snapshots get really large
#107
Yes I know that we should not snapshot test against something dynamic as
jest.fn()
and I swear 😇it was unintentional.But I have found that when
jest.fn()
is passed as a prop to some component, the snapshot fails everytime (which is expected) but along with this, it generates some really really large snapshot files.An example for reproducing this can be found here https://github.com/swashata/enzyme-to-json-bug
You can check the file https://github.com/swashata/enzyme-to-json-bug/blob/master/__snapshots__/Test.spec.jsx.snap which is like 7.6MB.
I guess this can be a
enzyme-to-json
thing?The text was updated successfully, but these errors were encountered: