-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Description
What is the problem this feature will solve?
In jsdom, we have 4187 tests. Sometimes I would like to run only a few of them, so I experimented with --test-name-pattern="dom/events"
to only run tests under my dom/events
suite.
The result was that I saw 4100+ lines of skipped tests, within which there was somewhere buried ~50 lines of passing tests. This was not a great experience.
Compare this with Mocha, where using --fgrep="dom/events"
only reports tests that match the pattern.
What is the feature you are proposing to solve the problem?
I see basically two ways to solve this:
-
Treat filtered-out tests differently from skipped tests. For example, the totals displayed at the bottom of the test report could exclude filtered-out tests entirely. (This is how Mocha behaves.)
-
Provide some way of not displaying skipped tests when using the spec reporter. E.g.,
--test-show-skipped=false
or something.
The former would be better for me, because sometimes I actually have tests marked as long-term skipped, and I'd like to see those even when I'm filtering. E.g. if I have 50 dom/events
tests, of which 3 are skipped, running with --test-name-pattern="dom/events"
would ideally show 47 passes and 3 skipped. If we filtered away all skipped tests, then it would show only the 47 passes.
The latter would probably be easier to implement, and fit better with how the test runner currently works.
What alternatives have you considered?
I could write my own reporter, I guess.