You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π
Following the closing of this issue jestjs/jest#13315 (comment), I'm opening one here.
CSSOM is not really maintained anymore and Jest tests are generating a lot of warning in our tests since we now use jest-environment-jsdom.
β Console
console.warn
Warning: [JSS] CSSOM.parse is not a function
53 | const registerScroll = useRegisterScrollElement()
54 |
> 55 | const classes = useAppLayoutStyles({
| ^
56 | innerHeight,
57 | showNavInDesktopOnly: navType === 'desktop-only',
58 | })
const{JSDOM}=require("jsdom");constdom=newJSDOM();constdocument=dom.window.document;conststyleElement=document.createElement('style');styleElement.appendChild(document.createTextNode(''));document.head.appendChild(styleElement);constsheet=styleElement.sheet;sheet.insertRule('@media only screen and (orientation: landscape) {}',0);// This next line will crash with the error TypeError: CSSOM.parse is not a functionsheet.cssRules[0].insertRule('.elem{background-color: red;}',0);
Hello, I'm upgrading jest to version 29 and I'm getting the error @Tirke has reported a year ago, it seems to be a regression
jest@29.6.4
jest-environment-jsdom@29.6.4 depends on jsdom@20.0.3
however I've forced jest-environment-jsdom to use lates jsdom, but the warning still there and making many of my tests to fail because the CSS are not compiled.
π
Following the closing of this issue jestjs/jest#13315 (comment), I'm opening one here.
CSSOM is not really maintained anymore and Jest tests are generating a lot of warning in our tests since we now use jest-environment-jsdom.
Is it possible to switch to something more maintained? (https://github.com/rrweb-io/CSSOM was suggested)
Basic info:
Minimal reproduction case
How does similar code behave in browsers?
Here is a link to a repro in replit
The text was updated successfully, but these errors were encountered: