projectwallace/extract-css-core

Build for master branch fails

bartveneman opened this issue · 1 comments

https://travis-ci.org/bartveneman/extract-css-core/builds/625868162

✔ it rejects on an invalid url (1.4s)
✔ it finds JS generated <style /> CSS (1.5s)
✖ it finds css-in-js, like Styled Components 
✔ it combines server generated <link> and <style> tags with client side created <link> and <style> tags (2.5s)
✔ it fetches css from a page with CSS in server generated <style> inside the <head> (2.6s)
✔ it finds JS generated <link /> CSS (2.6s)
✔ it rejects if the url has an HTTP error status (2.6s)
✔ it fetches css from a page with CSS in a server generated <link> inside the <head> (2.6s)

106:   t.is(actual, expected)

Difference:

  - 'html { color: rgb(255, 0, 0); }'
  + 'html { color: rgb(255, 0, 0); }.hJHBhT { color: blue; font-family: sans-serif; font-size: 3em; }'

Caused by Styled Components breaking in the CSS-in-JS unit test.

TypeError: right-hand side of 'in' should be an object, got undefined

Because of this TypeError, the HTML isn't rendered, causing the CSS not to be in the DOM, so that the script cannot pick up this CSS, leading to the difference between expected and the actual result.