Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b1da5d

Browse files
committed
remove mapCoverage deprecations
1 parent 75f4500 commit 3b1da5d

File tree

5 files changed

+2
-49
lines changed

5 files changed

+2
-49
lines changed

e2e/__tests__/deprecatedCliOptions.test.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

e2e/deprecated-cli-options/__tests__/dummy.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

e2e/deprecated-cli-options/package.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,15 @@ const jestAdapter = async (
7272
});
7373

7474
for (const path of config.setupFilesAfterEnv) {
75-
// TODO: remove ? in Jest 26
76-
const esm = runtime.unstable_shouldLoadAsEsm?.(path);
75+
const esm = runtime.unstable_shouldLoadAsEsm(path);
7776

7877
if (esm) {
7978
await runtime.unstable_importModule(path);
8079
} else {
8180
runtime.requireModule(path);
8281
}
8382
}
84-
85-
// TODO: remove ? in Jest 26
86-
const esm = runtime.unstable_shouldLoadAsEsm?.(testPath);
83+
const esm = runtime.unstable_shouldLoadAsEsm(testPath);
8784

8885
if (esm) {
8986
await runtime.unstable_importModule(testPath);

packages/jest-config/src/Deprecated.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ const deprecatedOptions: DeprecatedOptions = {
2020
}
2121
`,
2222

23-
mapCoverage: () => ` Option ${chalk.bold(
24-
'"mapCoverage"',
25-
)} has been removed, as it's no longer necessary.
26-
27-
Please update your configuration.`,
28-
2923
preprocessorIgnorePatterns: (options: {
3024
preprocessorIgnorePatterns?: Array<string>;
3125
}) => ` Option ${chalk.bold(

0 commit comments

Comments
 (0)