Since I've upgraded to v4 of Material UI, I'm having an issue with my classnames on snapshot testing. Meaning, the classnames are either on a non-deterministic order or there are issues with the counter.
I've never had this issue with v3 and I'm not using withStyles which seems to be related to this issue for others.
I've seen different issues on Github (using JssProvider for instance or shallow rendering) but I'd like to not add dependencies for this particular problem.
- Snapshot
+ Received
@@ -1,7 +1,7 @@
<button
- className="MuiButtonBase-root MuiButton-root MuiButton-containedPrimary MuiButton-contained"
+ className="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary"
or
- className="PrivateNotchedOutline-legend-36"
+ className="PrivateNotchedOutline-legend-37"
- I expect the classnames to change only if I changed the component.
- It seems to change randomly.