You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reporter is a Duplex,
which consumes the TAP input and output nothing by default.
However, it emits the following events during the process,
so that customize could listen to them and add something into the output.
reporter.on('test.start', test => {}).
Fired when a new test detected.
reporter.on('test.end', test => {}).
Fired when the end of a test reached.
reporter.on('test.assert', (assertion, test) => {}).
Fired when a new assertion found.
reporter.on('summary', (stats, fails, comments) => {}).
Fired when all TAP input has been processed.
Details about the test and assertion object could be found here.
The stats object:
varstats={// the total time (ms) it takesduration: duration,// the total number of assertions plannedplanned: res.plans.reduce(function(p,c){returnc.to-c.from+1+p;},0),// the actual total number of assertions foundassertions: res.asserts.length,// the number of successful assertionspass: res.pass.length,// the number of failed assertionsfail: res.fail.length,// the number of comments foundcomments: res.comments.length,}