starbeamjs / starbeam

Fun and simple reactivity
Other
342 stars 16 forks source link

Do the type tests actually run? #142

Closed mrazauskas closed 8 months ago

mrazauskas commented 9 months ago

@wycats I have noticed that recently you added TSTyche to test types (b8819e0). I am the author of the library. Glad to see it turns out to be useful. Thanks for giving it a try!

Just wanted to make sure: do you actually run these tests? It can be I missed something, but it looks like the tstyche command is not called anywhere. The command is the only way to run tests with TSTyche. (Programatic usage is also possible, that is another story.)

The commit added typecheck field to Vitest config, but Vitest does not know nothing about TSTyche tests. Same with tsc – the test files will compile, but nothing will get tested.

TSTyche is wrapping around TypeScript’s programatic APIs (similar to typescript-eslint). This is why it needs its own command. For instance, this allows testing on specific version of TypeScript. Or selecting test files and test cases to run directly from the command line: tstyche iterable --only set.

To learn more, see the command line reference: https://tstyche.org/reference/command-line