Hi y'all - I'm experiencing an odd issue where a snapshot started to recently fail when just running the normal jest test command, but pass when running with the jest --watch flag. The reason is that the styled-component classname seems to change depending on how I run the tests, so the snapshot fails since the classnames mismatch.
The open source repo is here and you can replicate the testing issue on this commit. (d8f7d65a2886f6c792c945cd067870da6fff99f1
Hi y'all - I'm experiencing an odd issue where a snapshot started to recently fail when just running the normal
jest test
command, but pass when running with the jest--watch
flag. The reason is that the styled-component classname seems to change depending on how I run the tests, so the snapshot fails since the classnames mismatch.The open source repo is here and you can replicate the testing issue on this commit. (
d8f7d65a2886f6c792c945cd067870da6fff99f1
One example test to replicate - https://github.com/glifio/safe/blob/primary/components/Msig/Create/Confirm.test.tsx#L85
If you run
only
this test with:npm run test:watch Create/Confirm
- you'll see it should passWhen you run the same test via
npm run test Create/Confirm
- you'll see it fails