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(jest): Bump dependencies #45603

Closed
Closed
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
18 changes: 9 additions & 9 deletions types/jest/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// Regev Brody <https://github.com/regevbr>
// Mark Skelton <https://github.com/mskelton>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8
Copy link
Contributor

Choose a reason for hiding this comment

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

I think TypeScript Version can be 3.2, is not it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, because the dependencies use import type, which is only supported since TypeScript 3.4.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ExE-Boss is that whats blocking this PR, or was it abandoned for another reason?

I've noticed in my dependency tree I've got some duplication caused by @types/jest being at the top of the tree: it causes some jest 25 packages to pulled in, which causes jest to duplicate itself in a bunch of places since I'm using 26.

I'm happy to do the dependency update, but wanted to check if this was the blocker before getting started :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Just recreated this PR:
#47545


declare var beforeAll: jest.Lifecycle;
declare var beforeEach: jest.Lifecycle;
Expand Down Expand Up @@ -782,13 +782,13 @@ declare namespace jest {
*/
toBeFalsy(): R;
/**
* For comparing floating point numbers.
* For comparing numeric values.
*/
toBeGreaterThan(expected: number): R;
toBeGreaterThan(expected: number | bigint): R;
/**
* For comparing floating point numbers.
* For comparing numeric values.
*/
toBeGreaterThanOrEqual(expected: number): R;
toBeGreaterThanOrEqual(expected: number | bigint): R;
/**
* Ensure that an object is an instance of a class.
* This matcher uses `instanceof` underneath.
Expand All @@ -798,13 +798,13 @@ declare namespace jest {
*/
toBeInstanceOf<E = any>(expected: E): R;
/**
* For comparing floating point numbers.
* For comparing numeric values.
*/
toBeLessThan(expected: number): R;
toBeLessThan(expected: number | bigint): R;
/**
* For comparing floating point numbers.
* For comparing numeric values.
*/
toBeLessThanOrEqual(expected: number): R;
toBeLessThanOrEqual(expected: number | bigint): R;
/**
* This is the same as `.toBe(null)` but the error messages are a bit nicer.
* So use `.toBeNull()` when you want to check that something is null.
Expand Down
4 changes: 4 additions & 0 deletions types/jest/jest-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -874,14 +874,18 @@ describe('', () => {
expect(0).toBeFalsy();

expect(0).toBeGreaterThan(1);
expect(0n).toBeGreaterThan(1n);

expect(0).toBeGreaterThanOrEqual(1);
expect(0n).toBeGreaterThanOrEqual(1n);

expect(3).toBeInstanceOf(Number);

expect(0).toBeLessThan(1);
expect(0n).toBeLessThan(1n);

expect(0).toBeLessThanOrEqual(1);
expect(0n).toBeLessThanOrEqual(1n);

expect(null).toBeNull();
expect(undefined).toBeNull();
Expand Down
8 changes: 2 additions & 6 deletions types/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"private": true,
"dependencies": {
"jest-diff": "^25.2.1",
"pretty-format": "^25.2.1"
},
"types": "index",
"typesVersions": {
">=3.2.0-0": { "*": ["ts3.2/*"] }
"jest-diff": "^26.0.0",
"pretty-format": "^26.0.0"
}
}
23 changes: 0 additions & 23 deletions types/jest/ts3.2/index.d.ts

This file was deleted.

13 changes: 0 additions & 13 deletions types/jest/ts3.2/jest-tests.ts

This file was deleted.

20 changes: 0 additions & 20 deletions types/jest/ts3.2/tsconfig.json

This file was deleted.

6 changes: 0 additions & 6 deletions types/jest/ts3.2/tslint.json

This file was deleted.

5 changes: 3 additions & 2 deletions types/jest/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"module": "commonjs",
"lib": [
"es6",
"dom"
"dom",
"ESNext"
],
"noImplicitAny": true,
"noImplicitThis": false,
Expand All @@ -13,7 +14,7 @@
"typeRoots": [
"../"
],
"target": "es5",
"target": "ESNext",
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
Expand Down