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

Run TS type tests on minimum supported version of TS #12444

Closed
SimenB opened this issue Feb 21, 2022 · 4 comments · Fixed by #12449
Closed

Run TS type tests on minimum supported version of TS #12444

SimenB opened this issue Feb 21, 2022 · 4 comments · Fixed by #12449

Comments

@SimenB
Copy link
Member

SimenB commented Feb 21, 2022

🚀 Feature Proposal

Right now, we verify on CI that Jest can be compiled with an older version of TypeScript (at the time of writing, v4.2). We should also run our type tests against that version.

This task is for adding a CI job installing the same minor version of TS (plus @tsd/typescript) we use for the compile check and run our type tests (in addition to the 4.5 (latest, at the moment of writing) run we have today).

/cc @mrazauskas (as an FYI, not that you should fix this (unless you want to! 😀))

@mrazauskas
Copy link
Contributor

That would be good to have.

Semi-related. If I get it right, the lowest supported Node version is 12.13. Just checked, yesterday tests in CI were running on Node v12.22. Is this intended, because of caret in ^12.13? Hm.. Seemed like that could be any version up from v12.13, or? In this case perhaps CI should run on v12.13? Otherwise the lowest supported is not tested.

@SimenB
Copy link
Member Author

SimenB commented Feb 21, 2022

We should add a job for the lowest version of 12, 14 and 16 as well probably, yeah

@mrazauskas
Copy link
Contributor

Just saw you updated verifyOldTs script. The test should blow up, because of this line in the code base (type modifiers is TS 4.5 feature, sorry, I introduced it here):

https://github.com/facebook/jest/blob/268bbed4eadaf9f1a6a5de3af6d3f2688a2868cb/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts#L10

Installing TS v4.2 locally, build fails pointing at this line.

@github-actions
Copy link

This issue 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 Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants