Open jisaacks opened 2 years ago
Any help on this?
If I manually edit that line to be:
const getHTML = () => (sheet.toString());
Everything works as expected.
I would hate to have to fork this project just to make that change tho.
Would love some help or pointed in the right direction to determine why isServer()
is true but new ServerStyleSheet().getStyleTags()
returns an empty string, even tho sheet.toString()
works as expected.
Thanks.
I keep getting:
I have been able to trace it to this line: https://github.com/styled-components/jest-styled-components/blob/4b07fde2607516db407a6215d17dfb461b90b491/src/utils.js#L25
My tests are running in node, so
isServer
is returning true, butnew ServerStyleSheet().getStyleTags()
is returning an empty string. However if I force it to instead usesheet.toString()
everything works as expected and my tests pass/fail as expected.