Spec-Zone.ru › QUnit

QUnit.reporters.console

Категории: QUnit.reporters.

версия добавлена: 2.3.0.

Описание

Репортёр console выводит JSON-объект для всех событий отчётности QUnit.on.

Используйте его для изучения или отладки генератора событий QUnit.

Пример

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

Использование

QUnit CLI:

qunit --reporter console test/

Включение вручную в коде JavaScript:

QUnit.reporters.console.init(QUnit);

Декларативное включение с помощью 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;

История изменений

QUnit 2.24.0 Декларативное включение с помощью QUnit.config.reporters.
QUnit 2.16.0 Предоставлен как QUnit.reporters.perf для программного использования.
QUnit 2.3.0 Добавлен в состав QUnit CLI и --reporter console.

© OpenJS Foundation and contributors.
Licensed under the MIT license.
https://qunitjs.com/api/reporters/console

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API