-
-
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
feat: upgrade to JSDOM 16 #9606
Conversation
I added |
The circus run complains about a memory leak. Is it correct or flake? |
It's ok because we know |
Update 'jsdom' version 16.2.1
With the last change, I guess the PR it's ready to review @SimenB @mindblight Thanks so much! |
As mentioned multiple times before, this cannot be merged until we're ready to make breaking changes, which we're not at the moment. It requires dropping node 8. This PR also introduces a memory leak |
Since jsdom 16 adds support to custom elements, this PR also enables users to test their custom web components like this:
|
jsdom@16.2.2 has memory and handle leak fixes that might be relevant to this PR. |
This should be rebased now that we've fixed the memory leak in circus. EDIT: I merged in master now |
Note to self, remember to merge #9938 after landing this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
…hile-running * upstream/master: (331 commits) chore: update ts-eslint (jestjs#9953) Updated config docs with default transform value (jestjs#8583) Update jest-phabricator documentation (jestjs#8662) chore: remove dependency on `realpath-native` (jestjs#9952) chore: bump dated dependencies (jestjs#9951) chore: another try at fixing test-utils dependency chore: update lockfile due to beta release chore: move changelog entry and fix tets utils dependency Fix time duration formatting as per SI (jestjs#9765) v26.0.0-alpha.0 chore: run some jsdom tests in leak check (jestjs#9938) chore: upgrade chalk to v4 (jestjs#9752) feat: upgrade to JSDOM 16 (jestjs#9606) chore: remove checks for compileFunction (jestjs#9949) chore: drop node 8 support (jestjs#9423) Remove leftover `providesModuleNodeModules` (jestjs#9948) [BREAKING] Pojer -> Nakazawa chore: revert lockfile changes from 2b32fe6 chore: move changelog entry and fix lint Remove `providesModuleNodeModules` from Jest. (jestjs#9583) ...
// In the `jsdom@16`, ArrayBuffer was not added to Window, ref: https://github.com/jsdom/jsdom/commit/3a4fd6258e6b13e9cf8341ddba60a06b9b5c7b5b | ||
// Install ArrayBuffer to Window to fix it. Make sure the test is passed, ref: https://github.com/facebook/jest/pull/7626 | ||
global.ArrayBuffer = ArrayBuffer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is wrong, since it causes the newly‑created global to have the ArrayBuffer
constructor from the outer realm, whereas jsdom/jsdom@3a4fd62 made it so that the inner realm has its own ArrayBuffer
constructor and prototype chain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ExE-Boss great! Wanna send a PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Fix #9507 by using new version of
jsdom
. PR should be merged tojest@26
or a jest version supported node >= 10 (a requirement injsdom
).Test plan
Green CI with node >= 10 and write new e2e tests to check leaking memory.