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

Migrate type tests to TSTyche #1497

Open
mrazauskas opened this issue Mar 4, 2024 · 4 comments
Open

Migrate type tests to TSTyche #1497

mrazauskas opened this issue Mar 4, 2024 · 4 comments

Comments

@mrazauskas
Copy link

Describe the feature request?

To draw your attention tsd-lite is deprecated. Currently tsd-lite is used via jest-runner-tsd to test types.

I was maintaining tsd-lite and helping with the runner too. Unfortunately the inner architecture of tsd is very limiting. To improve it I had to write a type test runner from scratch.

New or Affected Resource(s)

I would like to suggest migrating type tests to TSTyche. It is a new type testing tool which is replacing tsd-lite and jest-runner-tsd.

TSTyche has a lot of improvement:

  • lightweight (no dependencies, TSTyche loads and uses TypeScript you already have installed),
  • performant (just give it a spin),
  • helpers like test() and describe() with .only and .skip run mode modifiers,
  • familiar expect style assertions (with matchers like .toHaveProperty()),
  • testing on specified versions of TypeScript: tstyche --target 4.8,latest.

Currently TSTyche is used by Immutable.js, Jest, Redwood and few more smaller projects (including my own packages).

Provide a documentation link

Repo: https://github.com/tstyche/tstyche
Documentation: https://tstyche.org

Additional Information?

I can open a migration PR, if this sounds interesting.

@mrazauskas
Copy link
Author

mrazauskas commented Mar 4, 2024

Also I see that some other @okta packages are using tsd is some way. Probably this means you have to decide on tooling in organisation level. I can help migrating all tests to TSTyche, if you decide so.

I could find type tests in these packages:

@jaredperreault-okta
Copy link
Contributor

Thank you for the notice!

Internal Ref: OKTA-711014

@mrazauskas
Copy link
Author

Thanks for response. If you decide to use TSTyche, I can help to migrate the tests.

Here are few samples of migration PRs:

immutable-js/immutable-js#1989
jestjs/jest#14970
FloEdelmann/vue-ts-types#507

@jaredperreault-okta
Copy link
Contributor

@mrazauskas #1510

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