How do I make Jest not show me a summary of all the skipped tests?

Viewed 4979

I frequently run a single test, either with it.only or test.only or with the --testPathPattern='somepattern' options. I'll often watch the output in my terminal.

When I do, I can't see the output from my particular test, because Jest insists on showing me a summary of all the tests I skipped.

enter image description here

This goes on for many pages, hiding the test output I am trying to watch.

How can I stop jest from telling me the names of all the tests I skipped?

I've looked in the Jest config guide but can't find the option.

1 Answers

You set displaying the "individual test results with the test suite hierarchy" with the verbose option, but it's boolean and can't be disabled for the skipped tests only.

Whenever you're running only specific tests you can pass:

cli (npm)

npm test -- --testPathPattern='somepattern' --verbose=false

cli (yarn)

yarn test --testPathPattern='somepattern' --verbose=false

or disable it from the configuration, which you probably wouldn't want

package.json (a bit more permanent)

{
  //...
  "jest": {
    "verbose": false
  }
}

Related