Commit df2a22ee authored by Timo Tijhof's avatar Timo Tijhof Committed by Rick Waldron waldron.rick@gmail.com

Enforce 20s timeout for all unit tests.

parent 8ebb2f47
jQuery.noConflict(); // Allow the test to run with other libs or jQuery's. /**
* Allow the test suite to run with other libs or jQuery's.
*/
jQuery.noConflict();
// jQuery-specific QUnit.reset /**
* QUnit hooks
*/
(function() { (function() {
// jQuery-specific QUnit.reset
var reset = QUnit.reset, var reset = QUnit.reset,
ajaxSettings = jQuery.ajaxSettings; ajaxSettings = jQuery.ajaxSettings;
...@@ -12,10 +18,20 @@ jQuery.noConflict(); // Allow the test to run with other libs or jQuery's. ...@@ -12,10 +18,20 @@ jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.
}; };
})(); })();
// load testswarm agent /**
* QUnit configuration
*/
// Max time for stop() and asyncTest() until it aborts test
// and start()'s the next test.
QUnit.config.testTimeout = 20 * 1000; // 20 seconds
/**
* Load the TestSwarm listener if swarmURL is in the address.
*/
(function() { (function() {
var url = window.location.search; var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) ); url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + "swarmURL=".length ) );
if ( !url || url.indexOf("http") !== 0 ) { if ( !url || url.indexOf("http") !== 0 ) {
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment