QUnit.begin()


QUnit.begin( callback )

Description: Register a callback to fire whenever the test suite begins.

QUnit.begin() is called once before running any tests.

Example:

Get total amount of tests.

1
2
3
QUnit.begin(function( details ) {
console.log( "Test amount:", details.totalTests );
});