Skip to content

ssr-dom-shim in reactive-element is breaking test cases in vitest/happy-dom #3559

@abbasc52

Description

@abbasc52

Which package(s) are affected?

Lit Core (lit / lit-html / lit-element / reactive-element)

Description

as of v1.6.0 of reactive-element, it imports srr-dom-shim when environment is node.
When testing using dom emulation like happy-dom, it is loading the shim, which is causing test cases to fail.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-7rrc4s?file=package.json,test%2Fbasic.test.ts

Workaround

force @lit/reactive-element dependency version to 1.5.0

Is this a regression?

Yes. This used to work, but now it doesn't.

Affected versions

Failing with @lit/reactive-element 1.6.0, working with 1.5.0

Browser/OS/Node environment

OS: Windows 11
Node Version: 14.19
npm version: 6.14.17

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions