ludens-reklamebyra / react-crisscross

Flexible Layout Component for React
MIT License
2 stars 0 forks source link

Snapshot test fails due to auto-generated class names #23

Closed okaune closed 6 years ago

okaune commented 6 years ago

When running snapshot test, new classes cause tests to fail:

- Snapshot
+ Received

<div
-   className="sc-bdVaJa cAlmdd"
+   className="sc-bdVaJa fUXkXi"
>
  <div
-     className="sc-bdVaJa gTVLHs"
+     className="sc-bdVaJa bqmnDo"
  >
    I'm positioned left
  </div>
  <div
-     className="sc-bdVaJa gTVLHs"
+     className="sc-bdVaJa bqmnDo"
  >
    I'm positioned right
  </div>
</div>
oyvindhermansen commented 6 years ago

I know! This can be fixes by using https://github.com/styled-components/jest-styled-components for snapshots.