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

'ReferenceError: AbortSignal is not defined' during jest execution #2029

Closed
wants to merge 2 commits into from

Conversation

D-2-G-8
Copy link

@D-2-G-8 D-2-G-8 commented Mar 27, 2023

Fixes #1557

@mcollina
Copy link
Member

@DariaGritsienko thanks for opening this! #2021 seems already fixed, are you sure you linked to the right PR?

@D-2-G-8
Copy link
Author

D-2-G-8 commented Mar 28, 2023

yes, thanks, fixed it - #1557
@mcollina

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, let's see if this works!

@D-2-G-8
Copy link
Author

D-2-G-8 commented Mar 28, 2023

I studied this question a little more and found that jest adds in the jest-environment-node package global values, and they fixed it to auto in https://github.com/facebook/jest/pull/12642/files (v28.0.0)

const contextGlobals = new Set(Object.getOwnPropertyNames(global)); for (const nodeGlobalsKey of nodeGlobals) { if (!contextGlobals.has(nodeGlobalsKey)) { // @ts-expect-error global[nodeGlobalsKey] = globalThis[nodeGlobalsKey]; } }

I think undiсi will be better without this code... :)

if people run into this problem they will need to install jest-environment-node package version >=28.0.0 and update jest >=28.0.0

I'll go try to update jest in my project, if anything else I'll be back

@mcollina

@ronag ronag closed this Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"ReferenceError: AbortSignal is not defined" during jest execution
3 participants