summaryrefslogtreecommitdiff
path: root/js/test/Common/TestHelper.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/test/Common/TestHelper.js')
-rw-r--r--js/test/Common/TestHelper.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/test/Common/TestHelper.js b/js/test/Common/TestHelper.js
index c97f9d0cf34..b7a7718f38c 100644
--- a/js/test/Common/TestHelper.js
+++ b/js/test/Common/TestHelper.js
@@ -186,5 +186,7 @@
exports.TestHelper = TestHelper;
}(typeof global !== "undefined" && typeof global.process !== "undefined" ? module : undefined,
- typeof global !== "undefined" && typeof global.process !== "undefined" ? require : this.Ice._require,
- typeof global !== "undefined" && typeof global.process !== "undefined" ? exports : this));
+ typeof global !== "undefined" && typeof global.process !== "undefined" ? require :
+ (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) ? self.Ice._require : window.Ice._require,
+ typeof global !== "undefined" && typeof global.process !== "undefined" ? exports :
+ (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) ? self : window));