summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-12-21 12:47:10 +0100
committerBenoit Foucher <benoit@zeroc.com>2016-12-21 12:47:10 +0100
commitd77b38fc60d5110d1ce6c94a0b64337f860fb502 (patch)
tree748ada48b6c38b2c70e20474e1d202e892097c0f
parentSupported for automated browser testing (diff)
downloadice-d77b38fc60d5110d1ce6c94a0b64337f860fb502.tar.bz2
ice-d77b38fc60d5110d1ce6c94a0b64337f860fb502.tar.xz
ice-d77b38fc60d5110d1ce6c94a0b64337f860fb502.zip
Fix for running tests with ES5
-rw-r--r--js/bin/HttpServer.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/bin/HttpServer.js b/js/bin/HttpServer.js
index 400577fef5a..29e9cb1a1b2 100644
--- a/js/bin/HttpServer.js
+++ b/js/bin/HttpServer.js
@@ -171,6 +171,8 @@ function Init()
var m = es5 ? matchController[1].replace("es5/", "") : matchController[1];
var testpath = path.resolve(path.join(this._basePath, "test", matchController[1]))
var scripts = es5 ? [
+ "/node_modules/babel-polyfill/dist/polyfill.js",
+ "/node_modules/regenerator-runtime/runtime.js",
"/lib/es5/Ice.js",
"/test/es5/Common/Controller.js",
"/test/es5/Common/ControllerI.js",
@@ -208,8 +210,10 @@ function Init()
}
var filePath = path.resolve(path.join(basePath, req.url.pathname));
- if(filePath.indexOf("es5/") !== -1 && path.extname(filePath) != "js")
+ if(filePath.indexOf("es5/") !== -1 && path.extname(filePath) != ".js")
{
+ // We only host JS files in the es5 subdirectory, other files
+ // (such as config/escapes.cfg are in test)
filePath = filePath.replace("es5/", "")
}