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

Type testing setup improvements #361

Closed
mrazauskas opened this issue Feb 15, 2025 · 1 comment
Closed

Type testing setup improvements #361

mrazauskas opened this issue Feb 15, 2025 · 1 comment
Assignees

Comments

@mrazauskas
Copy link

Just to draw your attention: jest-runner-tsd was added to package.json since #360, but this runner is not used. It should be invoked via Jest (see Configuration), but right now type tests are run directly via tsd.

You can simply remove jest-runner-tsd, because it is not used.


jest-runner-tsd brings in several dependencies that are also not used. One of them is tsd-lite and it is deprecated. I was maintaining this fork for sometime, it was created to solve several limitations of tsd. For example, it was manageable to test types on several versions of TypeScript. The solution was rather clumsy, so I build a new type testing tool TSTyche (http://github.com/tstyche/tstyche).

I would recommend using TSTyche, because it:

  • can test types agains specific version or version ranges of TypeScript: tstyche --target 5.2, tstyche --target '>=5.0',
  • has test() and describe() with .skip and .only,
  • brings in zero dependencies and its install size is only 235kB (the install size of tsd is 48MB).

If it sounds interesting, I would be happy to open migration PR.

@harrisiirak
Copy link
Owner

Hi @mrazauskas,

Thanks for reporting this!

It's indeed unused dev dependency. Removed it in 9b1e0f3.

Best regards

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

No branches or pull requests

2 participants