kentcdodds / jest-glamor-react

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

Jest 21 #19

Closed MicheleBertoli closed 7 years ago

MicheleBertoli commented 7 years ago

Hello everyone :) Yesterday I updated jest-styled-components to support Jest v21 and since I learned how to fix it, I thought it might be helpful here as well.

The main change is that the withStyles "trick" on the val doesn't work anymore because the plugins now receive all the child nodes. The solution I applied marks all the nodes with withStyles, and it's backwards compatible.

I also updated the snapshots (before applying the changes) because the tests were failing.

codecov[bot] commented 7 years ago

Codecov Report

Merging #19 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #19   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines          62     65    +3     
  Branches       13     13           
=====================================
+ Hits           62     65    +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 2b35642...753af11. Read the comment docs.