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

Disable TS diagnostics for the test cases not being run #798

Closed
slikts opened this issue Oct 8, 2018 · 5 comments
Closed

Disable TS diagnostics for the test cases not being run #798

slikts opened this issue Oct 8, 2018 · 5 comments

Comments

@slikts
Copy link

slikts commented Oct 8, 2018

Issue :

I'm doing refactoring and I get a ton of compile errors, which is fine, but I'm starting with a specific test suite by filtering out the other test files, but I'm still getting flooded with the TS compile errors from the other files.

Expected behavior :

It doesn't need to show compile errors from test suites that aren't being run.

Debug log:

log file content
# content of ts-jest.log :

Minimal repo :

@slikts
Copy link
Author

slikts commented Oct 8, 2018

I've worked around this by temporarily disabling diagnostics.

@huafu
Copy link
Collaborator

huafu commented Oct 8, 2018

Sorry @slikts but this is kinda impossible. jest calls transform() of ts-jest for ANY file which is imported, how to know if this file is a source file depending on the test file being run? Or did I miss-understood?

I'm going to close this for now as a wont fix, but if you know or think of a solution for that, please re-open and explain.

@huafu huafu closed this as completed Oct 8, 2018
@huafu huafu added the wontfix label Oct 8, 2018
@inoyakaigor
Copy link

jest calls transform() of ts-jest for ANY file which is imported

@huafu Does this mean that this is the reason why I got this error?
image

@huafu
Copy link
Collaborator

huafu commented Oct 9, 2018

Nope, here you're missing a transformer for styl files in your jest config. So it tries to load index.styl.js, index.styl.ts, .... But for this, you'll have to look at jest configuration as it is unrelated to ts-jest. Look at jest transform option.

@slikts
Copy link
Author

slikts commented Feb 27, 2020

I've ran into this again, and I don't understand what the workflow is supposed to be; if I'm refactoring a specific part of the code, the test suite becomes unusable, because it's flooded with errors like unused values elsewhere, and filtering the tests doesn't help.

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

No branches or pull requests

3 participants