-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Support headless chrome as a test environment #3940
Comments
+1 |
1 similar comment
+1 |
You may want to look into cypress.io |
See #848. This is going to be a ton of work, it's not impossible, but currently nobody is working on it and it's not on our roadmap in the mid-term. |
JSDOM won't support web components anytime soon, Headless Chrome / Puppeteer should replace it in Jest as the defacto |
The problem with just doing a replacement is that puppeteer is async, so we need to bundle since You should follow #848 as linked earlier, although it's still not a priority (happy to review PRs that moves us closer to it, though) |
jest-puppeteer is good, but it's not friendly to test react components. So I switched to karma-chrome-launcher. /~https://github.com/Army-U/karma-react-component-headless-example |
There is /~https://github.com/hustcc/jest-electron ? |
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. |
Jest currently supports two environments out of the box: node and jsdom (cf http://facebook.github.io/jest/docs/configuration.html#testenvironment-string)
However jsdom lack the support of many browser features. You can take a quick look at all open requests: /~https://github.com/tmpvar/jsdom/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20label%3Afeature%20
And for sure, jsdom will always be behind Chrome in terms of feature support.
When testing a UI application, you end up adding a bunch of mocks or polyfills to complete jsdom.
Would you then consider adding support for headless chrome environment (on top of or as a replacement of jsdom)?
The text was updated successfully, but these errors were encountered: