From e24ef6969e7704a86923a7915354221e0ffd1759 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 15 Jul 2020 17:37:03 +0100 Subject: [PATCH] Bugfix / tests: Specs list type (#4169) * remove cruft.. ugh * housekeeping: close stale issues * fix issue #3945 --- src/node/hooks/express/tests.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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