Skip to content
/ jest Public
forked from jestjs/jest

Commit

Permalink
chore: upgrade TSTyche (jestjs#15369)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrazauskas authored Jan 15, 2025
1 parent 711769f commit 9a17df2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
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
3 changes: 2 additions & 1 deletion tstyche.config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"testFileMatch": ["packages/*/__typetests__/*.test.ts"]
"$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 @@ -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
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.2.0
resolution: "tstyche@npm:3.2.0"
peerDependencies:
typescript: 4.x || 5.x
peerDependenciesMeta:
typescript:
optional: true
bin:
tstyche: ./build/bin.js
checksum: abbd751b6666faad2b646dfdf2c3a95ea9b948b6803fa1e1df3dc2290737437268d25cc0064c5d5e418a55cba7cbf5d346f072870491d831b9472a0da7201865
checksum: 91be7f7136a722e254617ed98e4a6e2daa5170f41da5d7857d35816d4564a633f6e060e27e50599a4de32fdb3d404dae077a2aae72629089a54c68835e6542c9
languageName: node
linkType: hard

Expand Down

0 comments on commit 9a17df2

Please sign in to comment.