diff --git a/package.json b/package.json index ec08468d2463..f37e7ce507df 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/jest-expect/__typetests__/jest-expect.test.ts b/packages/jest-expect/__typetests__/jest-expect.test.ts index 966ac9e9fdd9..8360e0375c78 100644 --- a/packages/jest-expect/__typetests__/jest-expect.test.ts +++ b/packages/jest-expect/__typetests__/jest-expect.test.ts @@ -29,9 +29,9 @@ describe('JestExpect', () => { }); test('is superset of `Expect`', () => { - expect().type.toMatch(); + expect(jestExpect).type.toBeAssignableTo(_expect); - expect().type.not.toMatch(); + expect(_expect).type.not.toBeAssignableTo(jestExpect); }); test('allows type inference of the `actual` argument', () => { diff --git a/packages/jest-mock/__typetests__/mock-functions.test.ts b/packages/jest-mock/__typetests__/mock-functions.test.ts index d73d77f28326..fff6feedcec1 100644 --- a/packages/jest-mock/__typetests__/mock-functions.test.ts +++ b/packages/jest-mock/__typetests__/mock-functions.test.ts @@ -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(); + expect(fn()).type.toBeAssignableTo(); expect(fn()).type.toBe) => unknown>>(); expect(fn(() => {})).type.toBe void>>(); @@ -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(); + expect(spy).type.not.toBeAssignableTo(); expect(spy()).type.toRaiseError(); expect(new spy()).type.toRaiseError(); diff --git a/tstyche.config.json b/tstyche.config.json index 917ca2617ca0..bba3950eddc0 100644 --- a/tstyche.config.json +++ b/tstyche.config.json @@ -1,3 +1,4 @@ { - "testFileMatch": ["packages/*/__typetests__/*.test.ts"] + "$schema": "https://tstyche.org/schemas/config.json", + "testFileMatch": ["packages/*/__typetests__/**/*.test.ts"] } diff --git a/yarn.lock b/yarn.lock index cc8fe5240380..259391c0d3e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3334,7 +3334,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 @@ -20584,9 +20584,9 @@ __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.2.0 + resolution: "tstyche@npm:3.2.0" peerDependencies: typescript: 4.x || 5.x peerDependenciesMeta: @@ -20594,7 +20594,7 @@ __metadata: optional: true bin: tstyche: ./build/bin.js - checksum: abbd751b6666faad2b646dfdf2c3a95ea9b948b6803fa1e1df3dc2290737437268d25cc0064c5d5e418a55cba7cbf5d346f072870491d831b9472a0da7201865 + checksum: 91be7f7136a722e254617ed98e4a6e2daa5170f41da5d7857d35816d4564a633f6e060e27e50599a4de32fdb3d404dae077a2aae72629089a54c68835e6542c9 languageName: node linkType: hard