jest icon indicating copy to clipboard operation
jest copied to clipboard

Have a mode to print out a line for each test that's run

Open sophiebits opened this issue 12 years ago • 14 comments

More fun that way (instead of just the filename).

sophiebits avatar May 14 '14 17:05 sophiebits

I support this -- but it might be good to have it toggeable via an option to make grepping the output results still possible

jeffmo avatar May 14 '14 17:05 jeffmo

I might not be talking about the same thing, but if I am I think this is a great idea. Printing out each test run (or at least having a verbose option) might make the use of the word "test" a bit clearer.

For example:

Found 2 matching tests...
PASS __tests__/foo.js (0.02s)
PASS __tests__/bar.js (0.08s)
2 tests passed (2 total)
Run time: 1.236s

While there are 2 test files, some (including myself) might think of each it() call to be a test, in which case there is no way to see a list of all the tests being run. That or a test count:

Found 2 test files...
PASS __tests__/foo.js (4 tests in 0.02s)
PASS __tests__/bar.js (21 tests in 0.18s)
25 tests passed (25 total)
Run time: 1.236s

whymarrh avatar Aug 12 '14 02:08 whymarrh

Along these lines, it would also be nice to know how many x'd out tests there are (xit, xdescribe, etc.). x* doesn't cause a test file to fail, so if everything else about the file passes then it's essentially invisible in the test results.

I can think of a couple of cases where you'd want to know it was there, like if you temporarily disabled a failing test but forgot to reenable it later.

Adding to @whymarrh's example:

Found 2 test files...
PASS __tests__/foo.js (4 tests (2 skipped) in 0.02s)
PASS __tests__/bar.js (21 tests in 0.18s)
25 tests passed (25 total, 2 skipped)
Run time: 1.236s

Someone else could surely come up with a better way to display this information, but that should illustrate the point.

This might need a new issue.

jakeboone02 avatar Oct 08 '14 13:10 jakeboone02

Coming from the Angular world this was a bit confusing to begin with. I also would like test to mean how many it() calls even if this isn't on by default.

conatus avatar Apr 14 '15 15:04 conatus

+1

dtryon avatar Apr 26 '15 19:04 dtryon

+1

zdfs avatar Apr 30 '15 21:04 zdfs

+1

doodledood avatar May 02 '15 09:05 doodledood

+1

pbojinov avatar May 05 '15 18:05 pbojinov

+1

brunops avatar May 08 '15 20:05 brunops

:+1:

arcin avatar May 11 '15 18:05 arcin

This was fixed by the --verbose option https://github.com/facebook/jest/pull/370

jaredly avatar Jul 27 '15 22:07 jaredly

@jaredly is right, I think we can close this issue

arush avatar Sep 21 '15 23:09 arush

Not sure this was addressed. If I use verbose on some slow integration tests... it waits till all tests are run in that one file before it outputs the results. Is there a way to see each test as it passes in the suite/file?

metaskills avatar Jun 18 '18 13:06 metaskills

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

github-actions[bot] avatar May 12 '21 16:05 github-actions[bot]