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
Please provide window.customElements to be able to test custom Web Components #8818
Comments
This is a request to JSDOM, please send it there. |
There is jsdom/jsdom#1030 already (and PR: jsdom/jsdom#2548) |
I think that electron could include both node and chrome together. |
The current version of jsDom running in Jest is v15.1.1. The latest release of jsDom (16.2.0) includes full support for customElements: Any chance this issue be re-opened, and any ETA given for when Jest can bump the version? |
@awdltd where did you find the latest jsdom version Jest uses? I know Jsdom is a dependency. Just unsure of where it is explicity declared. |
@awdltd you'll need to use |
Thanks for the heads up and the quick response, @SimenB! Fortunately found |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I would like to test some custom web components. Chromium supports commands like
window.customElements.define('my-custom-element', MyCustomElementClass);
to register a custom web component.
However,
window.customElements
does not seem to be known in the context of jest tests.=> Please allow to test custom web components directly with jest.
Also see related SO question:
https://stackoverflow.com/questions/57478484/how-to-test-custom-web-component-with-jest/57481761#57481761
The text was updated successfully, but these errors were encountered: