enzymejs / enzyme

JavaScript Testing utilities for React
https://enzymejs.github.io/enzyme/
MIT License
19.95k stars 2.01k forks source link

Matchsnapshot not working in react using redux connect function. #2491

Closed bhavnahari27 closed 3 years ago

bhavnahari27 commented 3 years ago

I am using redux in my react project. Also i see that the basic MatchSnapShot function is not working for me . even though the snapshot file is created and testcase is passing,i dont see the html contents in that. Below is my component code.

It( 'matches snapshot', () => {
expect(
shallow(

)
).toMatchSnapshot();
});

Please help , is there something i missing?

ljharb commented 3 years ago

enzyme does not support or recommend snapshot testing - the closest we offer is wrapper.debug().

Additionally, please always fill out issue templates in their entirety; that’s what they’re for.