jest-runner-eslint
jest-runner-eslint copied to clipboard
marking ignored files as SKIPPED with no context is confusing
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.

I don’t think they should be hidden; i like the idea of showing more info about filenames.
We could probably return something in the console: [] field for those files
# I came here after some two hours of head-banging-against-wall, trial, error, hair-pulling and a few searches :nauseated_face:
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 ... :pensive:
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/ :grin:, but not skipped tests or test suites.
My two :yen: