-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Compilation errors aren't silenced in a .tst.ts
file when running typescript
, but the test still passes with tstyche
#13
Comments
Do I get it right, you would expect to see no error in Why do you run |
Thanks for giving a try for TSTyche! It is a fresh library, can be documentation is missing some clarity. Let’s figure this out. |
You're right. After giving it a second thought, that was a bit of an unfair expectation 😬
It's valuable for us to get autocomplete and other help from Typescript when writing a test (think of a normal unit test -- would you like it to write it without TSC?). Please note that if this would be another type test (not the one with I see your suggestion to not run TSC on type test files 🙌🏻 |
Wait.. Autocompletions should be there. TypeScript provides these through language service. That is just a technical detail, Are you trying to say that the errors should not be highlighted in IDE, if they are matched by |
Yeah sorry, I mixed things up a little, but here's what I meant:
|
Thanks! It still feels puzzling for me why you want to pass test files through And there is more: import { expect, test } from "tstyche";
test.skip("is skipped?", () => {
const a: string = 123; // obviously a type error, but it will be skipped
// ...
}); If a test is skipped, |
Yep exactly, type-checking code on-the-fly is something that boosts the development, from my experience. But anyway, it sounds like we just can't achieve that here, and the alternative way is to use IDE Language Server (we'll be waiting for the improvement about One more thought (unrelated to the original topic haha) -- is the |
Yes, the watch mode is planned for version 2. I have a working draft, but it needs more thinking. |
To make it easier to track the progress, I open these issues: Add a couple of sentences will be added to the documentation website as well. |
Hi, and thanks for this awesome library!
We noticed that
.toRaiseError
sometimes doesn't quite work as we expect it to with respect to compilation errors.We're not sure if there is a bug, or some better documentation is needed 🤔
Reproduction
/// file sample.tst.ts
And then when we run
yarn tsc
, the result isHowever, running
yarn tstyche
gives an expected output:Packages
The text was updated successfully, but these errors were encountered: