localvoid / chai-karma-snapshot

Chai Plugin for Snapshot Testing with Karma
MIT License
4 stars 8 forks source link

How to handle props that are generated randomly? #8

Closed brijeshb42 closed 3 years ago

brijeshb42 commented 5 years ago

I have a component that generates random string using uuid and passes it to a base component. This always results in the tests failing.

There's prop specific option testing in jest - https://github.com/facebook/jest/issues/2172#issuecomment-392748035