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

fix: handle mismatch between circus and runtime versions #9903

Merged
merged 2 commits into from
Apr 28, 2020

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Apr 27, 2020

Summary

Fixes #9851. I think it prints a peer dep warning that people are ignoring, but trivial to fix so why not

Test plan

Green CI

@thymikee thymikee merged commit 80dde6f into jestjs:master Apr 28, 2020
@SimenB SimenB deleted the optional-should-load-esm branch April 28, 2020 10:02
@@ -77,7 +77,8 @@ const jestAdapter = async (
});

for (const path of config.setupFilesAfterEnv) {
const esm = runtime.unstable_shouldLoadAsEsm(path);
// TODO: remove ? in Jest 26
const esm = runtime.unstable_shouldLoadAsEsm?.(path);

if (esm) {
await runtime.unstable_importModule(path);
Copy link
Member Author

Choose a reason for hiding this comment

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

for posterity, I didn't bother guarding this as esm will be falsy if the function doesn't exist

@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean install of Jest Circus results in 'runtime.unstable_shouldLoadAsEsm' error
3 participants