diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2018-10-04 15:43:58 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2018-10-04 15:43:58 +0200 |
commit | fb089e70838ec9a673577c0274fc202ccfcda7c2 (patch) | |
tree | 365dacb488f0dca3c35d2392d48cc3a2003d6105 /test | |
parent | 196d2a39712760b7671fa2feb54e1883a97796e5 (diff) | |
download | perl-software-in-gnu-guix-fb089e70838ec9a673577c0274fc202ccfcda7c2.tar perl-software-in-gnu-guix-fb089e70838ec9a673577c0274fc202ccfcda7c2.tar.gz |
fix build error
Diffstat (limited to 'test')
-rw-r--r-- | test/test-dependencies-async.html (renamed from test/test-async-dependencies.html) | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/test/test-async-dependencies.html b/test/test-dependencies-async.html index d08db28..b36c31b 100644 --- a/test/test-async-dependencies.html +++ b/test/test-dependencies-async.html @@ -29,32 +29,34 @@ <script src="qunit-2.5.0.js"></script> <script> - window.externalScriptSequence = ''; + var externalScriptSequence = ''; + var scriptCount = 0; + QUnit.config.autostart = false; QUnit.module( 'Async Dependencies' ); - var scriptCount = 0; - QUnit.test( 'Async scripts are loaded', function( assert ) { assert.expect( 5 ); var done = assert.async( 5 ); function callback( event ) { - if( window.externalScriptSequence.length === 1 ) { - assert.ok( window.externalScriptSequence === 'A', 'first callback was sync script' ); + if( externalScriptSequence.length === 1 ) { + assert.ok( externalScriptSequence === 'A', 'first callback was sync script' ); + done(); } else { assert.ok( true, 'async script loaded' ); + done(); } - if( window.externalScriptSequence.length === 4 ) { - assert.ok( window.externalScriptSequence.indexOf( 'A' ) !== -1 && - window.externalScriptSequence.indexOf( 'B' ) !== -1 && - window.externalScriptSequence.indexOf( 'C' ) !== -1 && - window.externalScriptSequence.indexOf( 'D' ) !== -1, 'four unique scripts were loaded' ); + if( externalScriptSequence.length === 4 ) { + assert.ok( externalScriptSequence.indexOf( 'A' ) !== -1 && + externalScriptSequence.indexOf( 'B' ) !== -1 && + externalScriptSequence.indexOf( 'C' ) !== -1 && + externalScriptSequence.indexOf( 'D' ) !== -1, 'four unique scripts were loaded' ); + done(); } - done(); scriptCount ++; } @@ -68,6 +70,8 @@ }); }); + QUnit.start(); + </script> </body> |