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

Update to Jest 28 #14490

Merged
merged 5 commits into from May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -160,8 +160,8 @@ jobs:
- name: Install
run: |
yarn install
- name: Downgrade Jest for node <= 8
if: matrix.node-version == '6' || matrix.node-version == '8'
- name: Downgrade Jest for node <= 10
if: matrix.node-version == '6' || matrix.node-version == '8' || matrix.node-version == '10'
run: |
yarn remove jest
yarn add --dev jest@24
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -61,7 +61,7 @@
"gulp-plumber": "^1.2.1",
"husky": "^7.0.4",
"import-meta-resolve": "^1.1.1",
"jest": "^27.4.0",
"jest": "^28.0.3",
"jest-light-runner": "^0.2.1",
"jest-worker": "^27.4.0",
"lint-staged": "^9.2.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/babel-core/test/resolution.js
Expand Up @@ -354,7 +354,7 @@ describe("addon resolution", function () {
// because Jest 24 has an issue on setting the MODULE_NOT_FOUND error when the native
// `require.resolve` is provided.
// see https://github.com/babel/babel/pull/12439/files#r535996000
process.versions.node.startsWith("8.")
parseInt(process.versions.node, 10) <= 10
? /Cannot (?:find|resolve) module 'babel-preset-foo'/
: /Cannot (?:find|resolve) module 'babel-preset-foo'.*\n- If you want to resolve "foo", use "module:foo"/s,
);
Expand All @@ -370,7 +370,7 @@ describe("addon resolution", function () {
plugins: ["foo"],
});
}).toThrow(
process.versions.node.startsWith("8.")
parseInt(process.versions.node, 10) <= 10
? /Cannot (?:find|resolve) module 'babel-plugin-foo'/
: /Cannot (?:find|resolve) module 'babel-plugin-foo'.*\n- If you want to resolve "foo", use "module:foo"/s,
);
Expand All @@ -386,7 +386,7 @@ describe("addon resolution", function () {
presets: ["foo"],
});
}).toThrow(
process.versions.node.startsWith("8.")
parseInt(process.versions.node, 10) <= 10
? /Cannot (?:find|resolve) module 'babel-preset-foo'/
: /Cannot (?:find|resolve) module 'babel-preset-foo'.*\n- Did you mean "@babel\/foo"\?/s,
);
Expand All @@ -402,7 +402,7 @@ describe("addon resolution", function () {
plugins: ["foo"],
});
}).toThrow(
process.versions.node.startsWith("8.")
parseInt(process.versions.node, 10) <= 10
? /Cannot (?:find|resolve) module 'babel-plugin-foo'/
: /Cannot (?:find|resolve) module 'babel-plugin-foo'.*\n- Did you mean "@babel\/foo"\?/s,
);
Expand All @@ -418,7 +418,7 @@ describe("addon resolution", function () {
presets: ["testplugin"],
});
}).toThrow(
process.versions.node.startsWith("8.")
parseInt(process.versions.node, 10) <= 10
? /Cannot (?:find|resolve) module 'babel-preset-testplugin'/
: /Cannot (?:find|resolve) module 'babel-preset-testplugin'.*\n- Did you accidentally pass a plugin as a preset\?/s,
);
Expand All @@ -434,7 +434,7 @@ describe("addon resolution", function () {
plugins: ["testpreset"],
});
}).toThrow(
process.versions.node.startsWith("8.")
parseInt(process.versions.node, 10) <= 10
? /Cannot (?:find|resolve) module 'babel-plugin-testpreset'/
: /Cannot (?:find|resolve) module 'babel-plugin-testpreset'.*\n- Did you accidentally pass a preset as a plugin\?/s,
);
Expand Down