dimanche 24 mai 2020

Pass parameters to a method which is expected to throw an error?

First steps with QUnit. Apologies if this is hyper-simple. I'm trying to understand things from this page of the manual.

If I have this:

QUnit.test( 'test init throws', function( assert ){
    assert.throws( loader.init, 'some message' )
});

... is there any way to pass parameters to that call to function init( param1, param2 )?

Aucun commentaire:

Enregistrer un commentaire