QUnit.config.modules

version added: 1.16.0.

Description

List of defined test modules.

type Array<Module> (read-only)

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:

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

Example

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