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: upgrade TSTyche #15369

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"strip-json-comments": "^3.1.1",
"tempy": "^1.0.0",
"ts-node": "^10.5.0",
"tstyche": "^2.0.0",
"tstyche": "^3.0.0",
"typescript": "^5.0.4",
"webpack": "^5.68.0",
"webpack-node-externals": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-expect/__typetests__/jest-expect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ describe('JestExpect', () => {
});

test('is superset of `Expect`', () => {
expect<typeof jestExpect>().type.toMatch<typeof _expect>();
expect(jestExpect).type.toBeAssignableTo(_expect);

expect<typeof _expect>().type.not.toMatch<typeof jestExpect>();
expect(_expect).type.not.toBeAssignableTo(jestExpect);
});

test('allows type inference of the `actual` argument', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-mock/__typetests__/mock-functions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('jest.fn()', () => {

test('models typings of mocked function', () => {
// eslint-disable-next-line @typescript-eslint/ban-types
expect(fn()).type.toMatch<Function>();
expect(fn()).type.toBeAssignableTo<Function>();

expect(fn()).type.toBe<Mock<(...args: Array<unknown>) => unknown>>();
expect(fn(() => {})).type.toBe<Mock<() => void>>();
Expand Down Expand Up @@ -424,7 +424,7 @@ describe('jest.spyOn()', () => {

test('models typings of spied object', () => {
// eslint-disable-next-line @typescript-eslint/ban-types
expect(spy).type.not.toMatch<Function>();
expect(spy).type.not.toBeAssignableTo<Function>();

expect(spy()).type.toRaiseError();
expect(new spy()).type.toRaiseError();
Expand Down
1 change: 1 addition & 0 deletions tstyche.config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"$schema": "https://tstyche.org/schemas/config.json",
"testFileMatch": ["packages/*/__typetests__/*.test.ts"]
}
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3322,7 +3322,7 @@ __metadata:
strip-json-comments: ^3.1.1
tempy: ^1.0.0
ts-node: ^10.5.0
tstyche: ^2.0.0
tstyche: ^3.0.0
typescript: ^5.0.4
webpack: ^5.68.0
webpack-node-externals: ^3.0.0
Expand Down Expand Up @@ -20584,17 +20584,17 @@ __metadata:
languageName: node
linkType: hard

"tstyche@npm:^2.0.0":
version: 2.1.1
resolution: "tstyche@npm:2.1.1"
"tstyche@npm:^3.0.0":
version: 3.0.0
resolution: "tstyche@npm:3.0.0"
peerDependencies:
typescript: 4.x || 5.x
peerDependenciesMeta:
typescript:
optional: true
bin:
tstyche: ./build/bin.js
checksum: abbd751b6666faad2b646dfdf2c3a95ea9b948b6803fa1e1df3dc2290737437268d25cc0064c5d5e418a55cba7cbf5d346f072870491d831b9472a0da7201865
checksum: 6401fd5e45e5fd1d21a1f9934a0d2d7957a85c2f970086bc18b577a9d87909d89ad24aa239e12138019b7ff7ea56aee9aaf9ed6a9beeae5ee4cf35055ae0cf7b
languageName: node
linkType: hard

Expand Down
Loading