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

marking ignored files as SKIPPED with no context is confusing #56

Open
cameron-jones-volusion opened this issue Oct 10, 2018 · 3 comments

Comments

@cameron-jones-volusion
Copy link

The change made in PR #5 caused files ignored in .eslintignore to be marked as skipped, rather than passed.

This is an improvement, but still confusing, because jest doesn't have any obvious way to find out which files are being skipped. Since I'm frequently running my linter simultaneously with my tests, I had to modify my .eslintignore file in order to verify that the skipped tests referred to unlinted files, and to make sure that I wasn't inadvertently skipping any of my behavior tests.

A less confusing approach might be to prevent the ignored files from ever being sent to Jest at all, as mentioned here.

Alternately, if we can't display the skipped filenames in the output directly, add output along the lines of "X files skipped due to .eslintignore rules." I think hiding them from Jest completely is a better approach, though.

image

@ljharb
Copy link
Collaborator

ljharb commented Oct 10, 2018

I don’t think they should be hidden; i like the idea of showing more info about filenames.

@rogeliog
Copy link
Member

We could probably return something in the console: [] field for those files

@paddy-hack
Copy link

# I came here after some two hours of head-banging-against-wall, trial, error, hair-pulling and a few searches 🤢

I have my .eslintignore linked to my .gitignore. The latter contains /coverage/ and /node_modules/. When collecting coverage data in a number of formats, I acquire some *.js files below ./coverage/. These then lead to the behaviour shown above. Oddly(?) enough, the *.js files below ./node_modules/ do not lead to skipped tests and test suites ... 😔

If you're minifying, uglifying and otherwise generating JavaScript files, you don't want to lint those and I don't want to show that up as skipped tests or test suites ... unless the skipped tests and test suites are cleared pointed out.
However, if I've told eslint in no uncertain terms to not give a hoot about those files, I'd rather not see them pop up as skipped tests or test suites. A note about which files were not linted (and then only in verbose mode or something like that) is OK, as long as you leave out anything below ./node_modules/ 😁, but not skipped tests or test suites.

My two 💴

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

4 participants