Reporters
TestReporter class reporting for duty!
Reporters are the way tests get reported. When running the CLI, the SummaryReporter
is used and all the values will be logged to the console. The test suite itself does not log out test results. If you want to use a custom reporter, you can create your own by extending the abstract Reporter
class.
Each test suite run will use the provided reporter and call onStart(suite: TestSuite)
to notify a consumer that a test has started. This happens once per test file. Since a file can have multiple describe
function calls, these are logically placed into TestGroup
s. Each TestGroup
has it's own description and contains a list of TestResult
s that were run.
If no reporter is provided to the configuration, one will be provided that uses stdout
and chalk
to provide colored output.
If performance is enabled, then the times
array will be populated with the runtime values measured in milliseconds.
Please note that the Performance
api will be deprecated, and so will this TestReporter
interface by version 4.0.0
.
Last updated
Was this helpful?