Skip to content

Commit

Permalink
Handle auto-running of the TestSwarm injection script in the test suite.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Mar 23, 2010
1 parent 8effe3a commit f6a50ca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/data/testrunner.js
@@ -1 +1,11 @@
jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.

// load testswarm agent
(function() {
var url = window.location.search;
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
if ( !url || url.indexOf("http") !== 0 ) {
return;
}
document.write("<scr" + "ipt src='http://testswarm.com/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
})();

0 comments on commit f6a50ca

Please sign in to comment.