Back to Qunit

QUnit.config.modules

docs/api/config/modules.md

2.26.0953 B
Original Source

List of defined test modules.

<table> <tr> <th>type</th> <td markdown="span">`Array<Module>` (read-only)</td> </tr> </table>

This property is exposed under QUnit.config for use by plugins and other integrations. It returns an array of internal Module objects, one for each call to QUnit.module().

Before accessing this property, wait for the QUnit.on('runStart') event, or use a QUnit.begin() callback.

Module object

The following properties are considered publicly supported:

propertydescription
name (string)Module name, as passed to QUnit.module().
moduleId (string)Hashed identifier, for the QUnit.config.moduleId filter.

Example

js
QUnit.on('runStart', () => {
  console.log(QUnit.config.modules.map(mod => mod.name));
});