diff options
Diffstat (limited to 'js/test/Common/Worker.js')
-rw-r--r-- | js/test/Common/Worker.js | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/js/test/Common/Worker.js b/js/test/Common/Worker.js index e7789c45ded..450a1dba73b 100644 --- a/js/test/Common/Worker.js +++ b/js/test/Common/Worker.js @@ -29,12 +29,27 @@ self.onmessage = function(e) if(e.data.type == "RunTest") { var test = e.data.test; - self.importScripts("/lib/Ice.js"); - self.importScripts("/test/Common/Controller.js"); + if(test.es5) + { + self.importScripts("/node_modules/babel-polyfill/dist/polyfill.js"); + self.importScripts("/node_modules/regenerator-runtime/runtime.js"); + self.importScripts("/lib/es5/Ice.js"); + self.importScripts("/test/Common/es5/Controller.js"); + } + else + { + self.importScripts("/lib/Ice.js"); + self.importScripts("/test/Common/Controller.js"); + } self.importScripts("/test/Common/TestRunner.js"); for(var i = 0; i < test.files.length; ++i) { - self.importScripts("/test/" + test.name + "/" + test.files[i]); + var f = "/test/" + test.name + "/" + test.files[i]; + if(test.es5) + { + f = f.replace("/test/Ice/", "/test/Ice/es5/"); + } + self.importScripts(f); } runTest(test.name, test.language, test.defaultHost, test.protocol, test.configurations, Output).then( function(r) |