Skip to content

Commit 1f21f58

Browse files
committed
4.4
1 parent 8a0ae3a commit 1f21f58

21 files changed

Lines changed: 37 additions & 41 deletions

File tree

.eslintrc.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ module.exports = {
4040
rules: {
4141
'@typescript-eslint/array-type': ['error', {default: 'generic'}],
4242
'@typescript-eslint/ban-types': 'error',
43-
'@typescript-eslint/no-implicit-any-catch': [
44-
'error',
45-
{allowExplicitAny: true},
46-
],
4743
'@typescript-eslint/no-unused-vars': [
4844
'error',
4945
{argsIgnorePattern: '^_'},

e2e/__tests__/resolveConditions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ onNodeVersions('>=12.16.0', () => {
2121
});
2222
try {
2323
expect(exitCode).toBe(0);
24-
} catch (error: unknown) {
24+
} catch (error) {
2525
console.log(`Test failed on iteration ${i + 1}`);
2626
throw error;
2727
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@jest/globals": "workspace:*",
1515
"@jest/test-utils": "workspace:*",
1616
"@tsconfig/node10": "^1.0.8",
17-
"@tsd/typescript": "~4.3.5",
17+
"@tsd/typescript": "~4.4.4",
1818
"@types/babel__core": "^7.0.0",
1919
"@types/babel__generator": "^7.0.0",
2020
"@types/babel__template": "^7.0.0",

packages/expect/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"devDependencies": {
2828
"@jest/test-utils": "^27.5.0",
29-
"@tsd/typescript": "~4.3.5",
29+
"@tsd/typescript": "~4.4.4",
3030
"chalk": "^4.0.0",
3131
"fast-check": "^2.0.0",
3232
"immutable": "^4.0.0",

packages/expect/src/__tests__/isError.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('isError', () => {
4343
testErrorFromDifferentContext((win: Window) => {
4444
try {
4545
win.document.querySelectorAll('');
46-
} catch (e: unknown) {
46+
} catch (e) {
4747
return e;
4848
}
4949
return null;

packages/expect/src/toThrowMatchers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const createMatcher = (
107107
} else {
108108
try {
109109
received();
110-
} catch (e: unknown) {
110+
} catch (e) {
111111
thrown = getThrown(e);
112112
}
113113
}

packages/jest-circus/src/run.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const _callCircusHook = async ({
157157
timeout,
158158
});
159159
await dispatch({describeBlock, hook, name: 'hook_success', test});
160-
} catch (error: unknown) {
160+
} catch (error) {
161161
await dispatch({describeBlock, error, hook, name: 'hook_failure', test});
162162
}
163163
};
@@ -180,7 +180,7 @@ const _callCircusTest = async (
180180
timeout,
181181
});
182182
await dispatch({name: 'test_fn_success', test});
183-
} catch (error: unknown) {
183+
} catch (error) {
184184
await dispatch({error, name: 'test_fn_failure', test});
185185
}
186186
};

packages/jest-circus/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export const callAsyncCircusFn = (
253253
} else {
254254
try {
255255
returnedValue = fn.call(testContext);
256-
} catch (error: unknown) {
256+
} catch (error) {
257257
reject(error);
258258
return;
259259
}

packages/jest-config/src/readConfigFileAndSetRootDir.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default async function readConfigFileAndSetRootDir(
3636
} else {
3737
configObject = await requireOrImportModule<any>(configPath);
3838
}
39-
} catch (error: unknown) {
39+
} catch (error) {
4040
if (isJSON) {
4141
throw new Error(
4242
`Jest: Failed to parse config file ${configPath}\n` +

packages/jest-core/src/TestScheduler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class TestScheduler {
286286
);
287287
}
288288
}
289-
} catch (error: unknown) {
289+
} catch (error) {
290290
if (!watcher.isInterrupted()) {
291291
throw error;
292292
}

0 commit comments

Comments
 (0)