jest-runner-eslint icon indicating copy to clipboard operation
jest-runner-eslint copied to clipboard

Show skipped filenames as "skipped" in yellow

Open ljharb opened this issue 6 years ago • 9 comments

I'd like to see, alongside green PASS and red FAIL, a yellow SKIP when a file is eslintignored (to match up with the nice new skip count).

It'd also be nice if there was an option to suppress reporting these skipped tests (but showing them by default).

ljharb avatar Sep 11 '17 20:09 ljharb

I'm not sure if Jest's reporter provides this feature, I think it doesn't but I might be wrong... If this is the case, then it would be harder to implement this because it might require changes in facebook/jest

rogeliog avatar Sep 12 '17 00:09 rogeliog

One thing that might help to mitigate the issue is adding the files/globs to testPathIgnorePatterns

rogeliog avatar Sep 12 '17 00:09 rogeliog

I don't want to duplicate the contents of .eslintignore tho - it totally would be nice to have the runner count up the number of ignored files, add that as a skip count (and explicit SKIP entries), and then use them in testPathIgnorePatterns to make the eslint run even faster :-D

ljharb avatar Sep 12 '17 00:09 ljharb

I agree, this would be great!

@cpojer there is no way that this could be achieved in the current version of Jest right?

rogeliog avatar Sep 12 '17 05:09 rogeliog

Don't pending tests show up in yellow in jest? That's what I'd assume ignored files would show up as.

ljharb avatar Sep 12 '17 05:09 ljharb

Yeah, I think this should work if in the eslint runner you report all tests within a file as skipped.

cpojer avatar Sep 12 '17 05:09 cpojer

Hmmm, I think I'm missing something sorry 😞

Isn't it that it could either show this when skipping all the tests screen shot 2017-09-12 at 9 59 28 am

or this when skipping the test suite? screen shot 2017-09-12 at 10 01 36 am

rogeliog avatar Sep 12 '17 17:09 rogeliog

In the case of the eslint runner, there's only 1 test per file, and 1 file per test suite, so both should be marked skipped, no?

ljharb avatar Sep 12 '17 17:09 ljharb

@rogeliog what about setting https://github.com/rogeliog/jest-runner-eslint/blob/master/src/utils/toTestResult.js#L18 and https://github.com/rogeliog/jest-runner-eslint/blob/master/src/utils/toTestResult.js#L13 ?

cpojer avatar Sep 12 '17 22:09 cpojer