Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Vitest #56

Open
lucaseverett opened this issue Sep 19, 2022 · 1 comment
Open

Issue with Vitest #56

lucaseverett opened this issue Sep 19, 2022 · 1 comment

Comments

@lucaseverett
Copy link

Vitest has stopped working when using rollup-plugin-postcss-lit. The issue started happening with a recent release of Vitest or Vite.

I've tried with both jsdom and happy-dom. The issue can be reproduced using the following repo.

https://github.com/lucaseverett/counter-lit

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

Vitest caught 1 unhandled error during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
 ❯ node_modules/@lit/reactive-element/node/css-tag.js:6:1193
 ❯ S node_modules/@lit/reactive-element/node/css-tag.js:6:1073
 ❯ Counter.createRenderRoot node_modules/@lit/reactive-element/node/reactive-element.js:6:2996
 ❯ Counter.createRenderRoot node_modules/lit-element/lit-element.js:6:163
 ❯ Counter.connectedCallback node_modules/@lit/reactive-element/node/reactive-element.js:6:3108
 ❯ Counter.connectedCallback node_modules/lit-element/lit-element.js:6:478
TypeError: Cannot read properties of undefined (reading 'cssText')
 ❯ Counter._connectToNode node_modules/happy-dom/lib/nodes/node/Node.js:417:22
 ❯ ShadowRoot.insertBefore node_modules/happy-dom/lib/nodes/node/Node.js:317:17
 ❯ ShadowRoot.insertBefore node_modules/happy-dom/lib/nodes/document-fragment/DocumentFragment.js:187:35
 ❯ ShadowRoot.insertBefore node_modules/happy-dom/lib/nodes/node/Node.js:295:22
 ❯ ShadowRoot.insertBefore node_modules/happy-dom/lib/nodes/document-fragment/DocumentFragment.js:187:35
 ❯ S node_modules/lit-html/node/lit-html.js:6:4914
 ❯ S.k node_modules/lit-html/node/lit-html.js:6:4980
 ❯ S.T node_modules/lit-html/node/lit-html.js:6:5354
 ❯ S._$AI node_modules/lit-html/node/lit-html.js:6:4809
 ❯ A node_modules/lit-html/node/lit-html.js:6:1015
 ❯ App.update node_modules/lit-element/lit-element.js:6:406
 ❯ App.performUpdate node_modules/@lit/reactive-element/node/reactive-element.js:6:4944
 ❯ App.scheduleUpdate node_modules/@lit/reactive-element/node/reactive-element.js:6:4591
 ❯ App._$Ej node_modules/@lit/reactive-element/node/reactive-element.js:6:4499
@umbopepato
Copy link
Owner

Hey @lucaseverett, are you still experiencing this issue? I cannot reproduce it on vite@4 and vitest@0.32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants