Skip to content

Commit 3006fa7

Browse files
committed
Make QUnit work with TestSwarm
1 parent 167e41f commit 3006fa7

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

test/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<script type="text/javascript" src="../qunit/qunit.js"></script>
88
<script type="text/javascript" src="test.js"></script>
99
<script type="text/javascript" src="same.js"></script>
10+
11+
<script src="swarminject.js"></script>
1012
</head>
1113
<body>
1214
<h1 id="qunit-header">QUnit Test Suite</h1>

test/swarminject.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// load testswarm agent
2+
(function() {
3+
var url = window.location.search;
4+
url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
5+
if ( !url || url.indexOf("http") !== 0 ) {
6+
return;
7+
}
8+
document.write("<scr" + "ipt src='http://swarm.jquery.org/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
9+
})();

0 commit comments

Comments
 (0)