Closed emmatown closed 7 years ago
Merging #10 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #10 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 3 3
Lines 92 95 +3
Branches 17 17
=====================================
+ Hits 92 95 +3
Impacted Files | Coverage Δ | |
---|---|---|
src/serializer.js | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update c251b1e...74d00aa. Read the comment docs.
What:
Let people pass in a custom
StyleSheet
instance to serializer.Why:
So that people who use css-in-js solutions like
cxs
can usejest-glamor-react
to test their components.How:
I wrapped the current serializer in a function that accepts a
StyleSheet
instance and returns a serializer. To not break the current API I called the function with glamor'sstyleSheet
and put those properties onto the function itself so it can be used in these two ways; first with glamor, second with any otherStyleSheet
like it.For the tests, I copied the ones from
index.test.js
and modified them to usecxs
. In the README, I usedcxs
as an example.Closes #5 Related: tkh44/emotion#21