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 few more type tests to TSTyche #14786

Merged
merged 1 commit into from
Dec 27, 2023
Merged

chore: migrate few more type tests to TSTyche #14786

merged 1 commit into from
Dec 27, 2023

Conversation

mrazauskas
Copy link
Contributor

Following up #14687

Summary

Migrating few smaller type test files to TSTyche.

Test plan

Type tests should pass in CI.

Copy link

netlify bot commented Dec 27, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 0095558
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/658bd47687fbb40008288dce
😎 Deploy Preview https://deploy-preview-14786--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__/**',
Copy link
Contributor Author

@mrazauskas mrazauskas Dec 27, 2023

Choose a reason for hiding this comment

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

Strange to see jest-types here. Might be there was some limitation, but now lint is passing (at least locally).

It feels right adding **/__typetests__/** to the list, or?

Alternatively tstyche could be declared in each package.json, but that feels somewhat unnecessary. The @jest/types did not require that, because of the line I suggest to remove here. That’s why I though adding **/__typetests__/** here can be good idea.

Copy link
Member

Choose a reason for hiding this comment

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

I don't remember the context here, but as long as CI is happy, I'm happy 😃


expectType<ConfigTypes.InitialOptions>(config);
expect<Config>().type.toEqual<InitialOptions>();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

By the way, TSTyche can compare two types just like that. No need of declare const.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

👍

@SimenB SimenB merged commit 1d30b3e into jestjs:main Dec 27, 2023
73 checks passed
@mrazauskas mrazauskas deleted the migrate-more-type-tests branch December 27, 2023 09:36
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants