Back to Qunit

QUnit.moduleStart()

docs/api/callbacks/QUnit.moduleStart.md

2.25.0652 B
Original Source

QUnit.moduleStart( callback )

Register a callback to fire whenever a module begins. The callback can return a promise that will be waited for before the next callback is handled.

parameterdescription
callback (function)Callback to execute. Provides a single argument with the callback Details object

Details object

Passed to the callback:

propertydescription
name (string)Name of the next module to run

Examples

Register a callback that logs the module name

js
QUnit.moduleStart(details => {
  console.log(`Now running: ${details.name}`);
});