-
-
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
fix(env-jsdom): remove setImmediate
and clearImmediate
#11222
Changes from 2 commits
3754dc0
1e15a27
0a0e649
e9873b0
e1e26f8
66c0e03
633ef87
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -652,12 +652,10 @@ export default class Runtime { | |
|
||
if (options?.isInternalModule) { | ||
moduleRegistry = this._internalModuleRegistry; | ||
} else if (this._isolatedModuleRegistry) { | ||
moduleRegistry = this._isolatedModuleRegistry; | ||
} else { | ||
if (this._isolatedModuleRegistry) { | ||
moduleRegistry = this._isolatedModuleRegistry; | ||
} else { | ||
moduleRegistry = this._moduleRegistry; | ||
} | ||
moduleRegistry = this._moduleRegistry; | ||
} | ||
|
||
const module = moduleRegistry.get(modulePath); | ||
|
@@ -1823,6 +1821,11 @@ export default class Runtime { | |
throw moduleNotFoundError; | ||
} | ||
|
||
e.message = `Jest: Got error evaluating ${path.relative( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's not have that now though to reduce the surface of this PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh wow I ran into that reference error yesterday for some reasons and it was gone out of the blue |
||
this._config.rootDir, | ||
module.filename, | ||
)}.\n${e.message}`; | ||
|
||
throw e; | ||
} | ||
|
||
|
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.
for some reason this is horribly slow:
If I comment out the
install
call (but keeping therequire
):Note that the
install
itself is fast, it's whatever happens when something throws later that that takes 10+ seconds...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.
@LinusU any ideas about what's happening here? I'm having some issues reproducing this using plain
JSDOM
, so I'm not really sure where to begin debugging this...