Jest: Make buffered console output available to testResultsProcessor

Created on 3 Apr 2018  路  3Comments  路  Source: facebook/jest

Do you want to request a _feature_ or report a _bug_?

_feature_

What is the current behavior?

A testResultsProcessor is given access to a lot of meaningful data but one thing not yet available is the console output from each test case.

What is the expected behavior?

It would be very helpful to provide the buffered console output to test results processors like jest-junit to include console output for each <testcase> (see https://github.com/palmerj3/jest-junit/issues/45 for more details).

Enhancement Help Wanted

Most helpful comment

Interesting! I think this should be possible, but I haven't dug into it.

All 3 comments

Interesting! I think this should be possible, but I haven't dug into it.

TestResult already have a console property.

However it seems that it is null unless jest us started with --verbose=false (see https://github.com/facebook/jest/issues/5232)

That seems super silly. I've been looking at the console stuff lately, and we should definitely still populate console even though we suppress the output in the default reporter.

Was this page helpful?
0 / 5 - 0 ratings