Skip to content

Commit 9a17df2

Browse files
authored
chore: upgrade TSTyche (#15369)
1 parent 711769f commit 9a17df2

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"strip-json-comments": "^3.1.1",
7979
"tempy": "^1.0.0",
8080
"ts-node": "^10.5.0",
81-
"tstyche": "^2.0.0",
81+
"tstyche": "^3.0.0",
8282
"typescript": "^5.0.4",
8383
"webpack": "^5.68.0",
8484
"webpack-node-externals": "^3.0.0",

packages/jest-expect/__typetests__/jest-expect.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ describe('JestExpect', () => {
2929
});
3030

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

34-
expect<typeof _expect>().type.not.toMatch<typeof jestExpect>();
34+
expect(_expect).type.not.toBeAssignableTo(jestExpect);
3535
});
3636

3737
test('allows type inference of the `actual` argument', () => {

packages/jest-mock/__typetests__/mock-functions.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describe('jest.fn()', () => {
8787

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

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

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

429429
expect(spy()).type.toRaiseError();
430430
expect(new spy()).type.toRaiseError();

tstyche.config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"testFileMatch": ["packages/*/__typetests__/*.test.ts"]
2+
"$schema": "https://tstyche.org/schemas/config.json",
3+
"testFileMatch": ["packages/*/__typetests__/**/*.test.ts"]
34
}

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3334,7 +3334,7 @@ __metadata:
33343334
strip-json-comments: ^3.1.1
33353335
tempy: ^1.0.0
33363336
ts-node: ^10.5.0
3337-
tstyche: ^2.0.0
3337+
tstyche: ^3.0.0
33383338
typescript: ^5.0.4
33393339
webpack: ^5.68.0
33403340
webpack-node-externals: ^3.0.0
@@ -20584,17 +20584,17 @@ __metadata:
2058420584
languageName: node
2058520585
linkType: hard
2058620586

20587-
"tstyche@npm:^2.0.0":
20588-
version: 2.1.1
20589-
resolution: "tstyche@npm:2.1.1"
20587+
"tstyche@npm:^3.0.0":
20588+
version: 3.2.0
20589+
resolution: "tstyche@npm:3.2.0"
2059020590
peerDependencies:
2059120591
typescript: 4.x || 5.x
2059220592
peerDependenciesMeta:
2059320593
typescript:
2059420594
optional: true
2059520595
bin:
2059620596
tstyche: ./build/bin.js
20597-
checksum: abbd751b6666faad2b646dfdf2c3a95ea9b948b6803fa1e1df3dc2290737437268d25cc0064c5d5e418a55cba7cbf5d346f072870491d831b9472a0da7201865
20597+
checksum: 91be7f7136a722e254617ed98e4a6e2daa5170f41da5d7857d35816d4564a633f6e060e27e50599a4de32fdb3d404dae077a2aae72629089a54c68835e6542c9
2059820598
languageName: node
2059920599
linkType: hard
2060020600

0 commit comments

Comments
 (0)