Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

Latest commit

 

History

History
40 lines (31 loc) · 963 Bytes

File metadata and controls

40 lines (31 loc) · 963 Bytes
layout page-api
title QUnit.config.current
excerpt Internal object representing the currently running test.
groups
config
extension
redirect_from
/config/current/
version_added 1.0.0

Internal object representing the currently running test.

type `object` (read-only)

This property is not actually a configuration option, but is exposed under QUnit.config for use by plugins and other integrations. This offers access to QUnit's internal Test object at runtime.

Internals may change without notice. When possible, use QUnit.on or other callbacks instead.

Example

Access QUnit.config.current.testName to observe the currently running test's name.

function whatsUp () {
  console.log(QUnit.config.current.testName);
}

QUnit.test('example', assert => {
  whatsUp();

  assert.true(true);
});