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

Latest commit

 

History

History
37 lines (28 loc) · 891 Bytes

QUnit.moduleStart.md

File metadata and controls

37 lines (28 loc) · 891 Bytes
layout title excerpt groups redirect_from version_added
page-api
QUnit.moduleStart()
Register a callback to fire whenever a module begins.
callbacks
/callbacks/QUnit.moduleStart/
/QUnit.moduleStart/
1.0.0

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.

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

Details object

Passed to the callback:

property description
name (string) Name of the next module to run

Examples

Register a callback that logs the module name

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