Skip to content
Grzegorz Pabian edited this page Jul 21, 2014 · 1 revision

Overview

Reporters are plugins used to log Bender's events triggered during the test execution.

Structure

There are two ways to define a reporter:

  • create a typical Bender plugin and bind to the events using bender.on() method, see listening to events section for more details,

  • define event callbacks as properties of the reporter:

    Example:

    module.exports = {
        name: 'bender-reporter-example:',
    
        'client:complete': function (data) {
            // report test completion
        },
    
        'client:result': function (data) {
            // report test result
        }
    };

Clone this wiki locally