QUnit.assert


QUnit.assert

Description: Namespace for QUnit assertions

    QUnit's built-in assertions are defined on the QUnit.assert object. An instance of this object is passed as the only argument to the QUnit.test function callback.

    This object has properties for each of QUnit's built-in assertion methods.

    Example:

    Use the ok assertion through the test callback parameter:

    1
    2
    3
    QUnit.test( "`ok` assertion defined in the callback parameter", function( assert ) {
    assert.ok( true, "on the object passed to the `test` function" );
    });