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

chore(type tests): bump jest-runner-tsd #12299

Merged
merged 5 commits into from Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -14,6 +14,7 @@
"@jest/globals": "workspace:*",
"@jest/test-utils": "workspace:*",
"@tsconfig/node10": "^1.0.8",
"@tsd/typescript": "^4.5.5",
mrazauskas marked this conversation as resolved.
Show resolved Hide resolved
"@types/babel__core": "^7.0.0",
"@types/babel__generator": "^7.0.0",
"@types/babel__template": "^7.0.0",
Expand Down Expand Up @@ -55,7 +56,7 @@
"jest-changed-files": "workspace:*",
"jest-junit": "^13.0.0",
"jest-mock": "workspace:*",
"jest-runner-tsd": "^1.1.0",
"jest-runner-tsd": "^2.0.0",
"jest-silent-reporter": "^0.5.0",
"jest-snapshot": "workspace:*",
"jest-snapshot-serializer-raw": "^1.1.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/expect/__typechecks__/tsconfig.json
@@ -0,0 +1,6 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
mrazauskas marked this conversation as resolved.
Show resolved Hide resolved
"skipLibCheck": true
mrazauskas marked this conversation as resolved.
Show resolved Hide resolved
}
}
2 changes: 1 addition & 1 deletion packages/jest-types/__typechecks__/config.test.ts
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {expectAssignable} from 'mlh-tsd';
import {expectAssignable} from 'tsd-lite';
import type {Config} from '@jest/types';

expectAssignable<Config.InitialOptions>({
Expand Down
18 changes: 9 additions & 9 deletions packages/jest-types/__typechecks__/expect.test.ts
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {expectError, expectType} from 'mlh-tsd';
import {expectError, expectType} from 'tsd-lite';
import {expect} from '@jest/globals';

// asymmetric matchers
Expand Down Expand Up @@ -182,26 +182,26 @@ expectError(expect(jest.fn()).toHaveBeenCalledTimes());

expectType<void>(expect(jest.fn()).toBeCalledWith('value'));
expectType<void>(expect(jest.fn()).toBeCalledWith('value', 123));
// expectError(expect(jest.fn()).toBeCalledWith());
expectError(expect(jest.fn()).toBeCalledWith());
expectType<void>(expect(jest.fn()).toHaveBeenCalledWith(123));
expectType<void>(expect(jest.fn()).toHaveBeenCalledWith(123, 'value'));
// expectError(expect(jest.fn()).toHaveBeenCalledWith());
expectError(expect(jest.fn()).toHaveBeenCalledWith());

expectType<void>(expect(jest.fn()).lastCalledWith('value'));
expectType<void>(expect(jest.fn()).lastCalledWith('value', 123));
// expectError(expect(jest.fn()).lastCalledWith());
expectError(expect(jest.fn()).lastCalledWith());
expectType<void>(expect(jest.fn()).toHaveBeenLastCalledWith(123));
expectType<void>(expect(jest.fn()).toHaveBeenLastCalledWith(123, 'value'));
// expectError(expect(jest.fn()).toHaveBeenLastCalledWith());
expectError(expect(jest.fn()).toHaveBeenLastCalledWith());

expectType<void>(expect(jest.fn()).nthCalledWith(1, 'value'));
expectType<void>(expect(jest.fn()).nthCalledWith(1, 'value', 123));
// expectError(expect(jest.fn()).nthCalledWith());
// expectError(expect(jest.fn()).nthCalledWith(2));
expectError(expect(jest.fn()).nthCalledWith());
expectError(expect(jest.fn()).nthCalledWith(2));
expectType<void>(expect(jest.fn()).toHaveBeenNthCalledWith(1, 'value'));
expectType<void>(expect(jest.fn()).toHaveBeenNthCalledWith(1, 'value', 123));
// expectError(expect(jest.fn()).toHaveBeenNthCalledWith());
// expectError(expect(jest.fn()).toHaveBeenNthCalledWith(2));
expectError(expect(jest.fn()).toHaveBeenNthCalledWith());
expectError(expect(jest.fn()).toHaveBeenNthCalledWith(2));

expectType<void>(expect(jest.fn()).toReturn());
expectError(expect(jest.fn()).toReturn('value'));
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-types/__typechecks__/globals.test.ts
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {expectError, expectType} from 'mlh-tsd';
import {expectError, expectType} from 'tsd-lite';
import {
afterAll,
afterEach,
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-types/__typechecks__/jest.test.ts
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import {expectError, expectType} from 'mlh-tsd';
import {expectError, expectType} from 'tsd-lite';
import {jest} from '@jest/globals';
import type {Mock} from 'jest-mock';

Expand Down
6 changes: 6 additions & 0 deletions packages/jest-types/__typechecks__/tsconfig.json
@@ -0,0 +1,6 @@
{
"extends": "../../../tsconfig.json",
mrazauskas marked this conversation as resolved.
Show resolved Hide resolved
"compilerOptions": {
"skipLibCheck": true
}
}
2 changes: 1 addition & 1 deletion packages/jest-types/package.json
Expand Up @@ -27,7 +27,7 @@
"chalk": "^4.0.0"
},
"devDependencies": {
"mlh-tsd": "^0.14.1"
"tsd-lite": "^0.5.0"
},
"publishConfig": {
"access": "public"
Expand Down