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: migrate type tests of each to TSTyche #14994

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mrazauskas
Copy link
Contributor

This PR migrates type tests of each to TSTyche.

This is the final migration PR, so I also removed all infrastructure related to tsd.

TSTyche version got bump as well, because I found a bug. It did not collect nested expect, which is crucial in this file. This problem is fix in tstyche@2.0.0-beta.0. It is a beta release, because I am adding --watch. The watch mode is the only part which is less tested, the testing logic did not change.

Also note that .toEqual() is renamed to .toBe(). This makes it smoother to replace .toBeString() with .toBe<string | undefined>() if there is a need. The old matchers are deprecated, but work as before. I will rework other test files later.

Test plan

Green CI.

Copy link

netlify bot commented Mar 29, 2024

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit dbe949b
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/6629f2c51df5f90008d477fd
😎 Deploy Preview https://deploy-preview-14994--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

"packages/jest-types/__typetests__/jest.test.ts",
"packages/jest-worker/__typetests__/*.test.ts"
]
"testFileMatch": ["packages/*/__typetests__/*.test.ts"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping this line improves performance a bit. It makes sure that root directories other than packages are skipped from lookup (for example, e2e is good candidate to skip).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant