QUnit.reporters.console

version added: 2.3.0.

Description

The console reporter logs a JSON object from all QUnit.on reporting events.

Use this to explore or debug the QUnit event emitter.

Example

runStart {…}
testStart {…}
testEnd {…}
testStart {…}
testEnd {…}
runEnd {…}

Usage

QUnit CLI:

qunit --reporter console test/

Enable manually in JavaScript code:

QUnit.reporters.console.init(QUnit);

Enable declaratively via QUnit.config:

// Preconfig:
// Set as environment variable to Node.js,
// or as global variable before loading qunit.js
qunit_config_reporters_console = true;

// Config: Set from any inline script or JS file after qunit.js
QUnit.config.reporters.console = true;

Changelog

UNRELEASED Enable declaratively via QUnit.config.reporters.
QUnit 2.16.0 Exposed as QUnit.reporters.perf for programmatic usage.
QUnit 2.3.0 Introduced as part of the QUnit CLI and --reporter console.