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

Incompatible with happy-dom #47

Open
danazag opened this issue Nov 24, 2023 · 1 comment
Open

Incompatible with happy-dom #47

danazag opened this issue Nov 24, 2023 · 1 comment
Labels
question Further information is requested

Comments

@danazag
Copy link

danazag commented Nov 24, 2023

Hi there! I'm using Vitest to run my tests, and for a performance boost I'm investigating rendering with happy-dom. However, when I try to run my tests, I get this error:

TypeError: Cannot set property isConnected of [object Object] which has only a getter
 ❯ new Node node_modules/happy-dom/src/nodes/node/Node.ts:57:29
 ❯ new Element node_modules/happy-dom/lib/nodes/element/Element.js:25:9
 ❯ new HTMLElement node_modules/happy-dom/lib/nodes/html-element/HTMLElement.js:17:9
 ❯ HTMLDocument.createElementNS node_modules/happy-dom/src/nodes/document/Document.ts:834:19
 ❯ HTMLDocument.createElement node_modules/happy-dom/src/nodes/document/Document.ts:803:15
 ❯ Object.<anonymous> node_modules/photoviewer/dist/photoviewer.common.js:97:22

I've seen this issue in a few libraries, including the axe-core library capricorn86/happy-dom#978 where they documented a trivial workaround.

Thanks for all your work on this library, it's awesome.

@nzbin nzbin added the question Further information is requested label Nov 25, 2023
@nzbin
Copy link
Owner

nzbin commented Dec 5, 2023

Thanks for your advice, I'm unfamiliar with happy-dom and I don't know what should to do.

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

No branches or pull requests

2 participants