Test reporters
If we look at the console output of the Jasmine test runner, we see that it is showing a green dot for each test that we have run, and then a count of how many tests were run, and how many failures we encountered. But what if we would like to see the name of each test that we have run on the console? This is where Jasmine reporters come in. Jasmine reporters allow us to modify the output of each test suite, and the output of each test itself to give a more detailed description. We can configure a test reporter by injecting some code into a file in the helpers directory, which Jasmine will load and run before each test run.
A number of Jasmine reporters have already been written, and are included in the npm package named jasmine-reporters ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access