Skip to content

Commit 4314a28

Browse files
committed
Server: Append injected scripts to body instead of head
Any setup that loads QUnit in the body instead of head will timeout out otherwise.
1 parent 7561403 commit 4314a28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ exports.Server = function Server(bsClient, workers) {
9292
pathMatches = (filePath == config.test_path);
9393
}
9494
if (pathMatches && mimeType === 'text/html') {
95-
var matcher = /(.*)<\/head>/;
95+
var matcher = /(.*)<\/body>/;
9696
var patch = "$1";
9797
scripts.forEach(function(script) {
9898
patch += "<script type='text/javascript' src='/_patch/" + script + "'></script>\n";
@@ -118,7 +118,7 @@ exports.Server = function Server(bsClient, workers) {
118118
patch += "<script type='text/javascript' src='/_patch/" + script + "'></script>\n";
119119
});
120120
}
121-
patch += "</head>";
121+
patch += "</body>";
122122

123123
file = file.replace(matcher, patch);
124124
}

0 commit comments

Comments
 (0)