QUnit.config.modules
version added: 1.16.0.
Description
List of defined test modules.
type | Array<Module> (read-only) |
---|
The QUnit.config.modules
property is exposed 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 stable and public:
property | description |
---|---|
name (string) |
Module name, as passed to QUnit.module() . |
moduleId (string) |
Hashed identifier, for the QUnit.config.moduleId filter. |
Other properties may change without notice. When possible, use QUnit.on or event callbacks instead.
Example
QUnit.on('runStart', () => {
console.log(QUnit.config.modules.map(mod => mod.name));
});