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

Report "warn" somehow #21

Open
Haroenv opened this issue Dec 21, 2017 · 7 comments
Open

Report "warn" somehow #21

Haroenv opened this issue Dec 21, 2017 · 7 comments

Comments

@Haroenv
Copy link

Haroenv commented Dec 21, 2017

This is not a feature of jest, but it's useful to keep things as a warning when you know that a project isn't finished yet. For example todo comments are useful to keep track of where you are in finishing, but also still useful to see in the tests, without needing to fail for it.

@keplersj
Copy link

keplersj commented Dec 21, 2017

I kinda handle this in jest-runner-tslint. I mark the test as passing but still provide a formatted output with the warnings. Would that work here?

@ljharb
Copy link
Collaborator

ljharb commented Dec 21, 2017

#9 is for reporting ignored files; it would be nice to also have a way to display warnings (but i'm fine if it's not the default).

@Haroenv
Copy link
Author

Haroenv commented Dec 21, 2017

Skipped and warn could indeed probably use the same UI

@keplersj
Copy link

@Haroenv I agree that it could, but I don't think that it should.

I think that skipped should only be used for files that are actually skipped by the linter, but files with just warnings should be marked as passed and print their warnings.

@ljharb
Copy link
Collaborator

ljharb commented Dec 22, 2017

I definitely don't think they should be the same.

However, I'm not sure I'm comfortable with marking warnings as "passed" while still printing the output (but I don't have a better suggestion)

@rogeliog
Copy link
Member

Hi! Thanks for reporting and sorry for the late response, I've been sick

Yeah I agree that it is a bit weird. I think this type of examples are great for maturing the jest-runners in general, given that right now it works specifically for Jest use cases, but there areas like this could be generalized to support this use cases

@suchipi
Copy link

suchipi commented Apr 4, 2018

In a project I'm working on, we treat warnings and errors more-or-less the same (we run eslint in CI with --max-warnings 0), but we use both errors and warnings because it's nice to see different colors for different things in the editor. In order to get warnings to count as failures with jest-runner-eslint, I wrote a second config that pulls in our normal config and changes all the "warn"s to "error". Then I tell jest-runner-eslint to use that config using the cliOptions.config option.

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

5 participants