kentcdodds / jest-glamor-react

Jest utilities for Glamor and React
https://npm.im/jest-glamor-react
MIT License
98 stars 24 forks source link

Support providing custom StyleSheet instance. #5

Closed tkh44 closed 7 years ago

tkh44 commented 7 years ago

Since there are multiple libraries out there that are built on glamor, if you allow the user to pass in the instance of StyleSheet from their lib you can support them all!

If this sounds like something you would like to add I can do most of the legwork. I have already tested this with cxs to test restyles.

tkh44 commented 7 years ago

Maybe something like

import { sheet } from 'cxs'
expect.addSnapshotSerializer(serializer(sheet))
...
kentcdodds commented 7 years ago

Sounds great! Though I'd prefer to not break the current API. If you can make that work, let's do it!