2 QUnit
.asyncTest( 'jquery.delayedBind with data option', 2, function ( assert
) {
3 var $fixture
= $( '<div>' ).appendTo( '#qunit-fixture' ),
9 $fixture
.delayedBind( delay
, 'testevent', data
, function ( e
) {
10 assert
.ok( true, 'testevent fired' );
11 assert
.ok( e
.data
=== data
, 'data is passed through delayedBind' );
15 // We'll trigger it thrice, but it should only happen once.
16 $fixture
.trigger( 'testevent', {} );
17 $fixture
.trigger( 'testevent', {} );
18 $fixture
.trigger( 'testevent', {} );
19 $fixture
.trigger( 'testevent', {} );
22 QUnit
.asyncTest( 'jquery.delayedBind without data option', 1, function ( assert
) {
23 var $fixture
= $( '<div>' ).appendTo( '#qunit-fixture' ),
26 $fixture
.delayedBind( delay
, 'testevent', function () {
27 assert
.ok( true, 'testevent fired' );
31 // We'll trigger it thrice, but it should only happen once.
32 $fixture
.trigger( 'testevent', {} );
33 $fixture
.trigger( 'testevent', {} );
34 $fixture
.trigger( 'testevent', {} );
35 $fixture
.trigger( 'testevent', {} );