diff --git a/src/node/hooks/express/tests.js b/src/node/hooks/express/tests.js index efc03fa48..216715d43 100644 --- a/src/node/hooks/express/tests.js +++ b/src/node/hooks/express/tests.js @@ -17,7 +17,8 @@ exports.expressCreateServer = function (hook_name, args, cb) { files = files.filter(el => !/\.swp$/.test(el)) console.debug("Sent browser the following test specs:", files); - res.send("var specs_list = " + JSON.stringify(files) + ";\n"); + res.setHeader('content-type', 'text/javascript'); + res.end("var specs_list = " + JSON.stringify(files) + ";\n"); }); // path.join seems to normalize by default, but we'll just be explicit