summaryrefslogtreecommitdiff
path: root/js/test/Ice/operations/Client.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/test/Ice/operations/Client.js')
-rw-r--r--js/test/Ice/operations/Client.js32
1 files changed, 15 insertions, 17 deletions
diff --git a/js/test/Ice/operations/Client.js b/js/test/Ice/operations/Client.js
index 77093f5f18c..a426b915128 100644
--- a/js/test/Ice/operations/Client.js
+++ b/js/test/Ice/operations/Client.js
@@ -7,20 +7,16 @@
//
// **********************************************************************
-(function(global){
- var require = typeof(module) !== "undefined" ? module.require : function(){};
+(function(module, require, exports)
+{
+ var Ice = require("icejs").Ice;
+ var Test = require("Test").Test;
- require("Ice/Ice");
- require("Test");
- require("Twoways");
- require("Oneways");
- require("BatchOneways");
+ var Twoways = require("Twoways").Twoways;
+ var Oneways = require("Oneways").Oneways;
+ var BatchOneways = require("BatchOneways").BatchOneways;
- var Ice = global.Ice;
var Promise = Ice.Promise;
- var Twoways = global.Twoways;
- var Oneways = global.Oneways;
- var BatchOneways = global.BatchOneways;
var allTests = function(out, communicator, Test, bidir)
{
@@ -85,7 +81,7 @@
//
id.properties.setProperty("Ice.MessageSizeMax", "100");
var c = Ice.initialize(id);
- return allTests(out, c, global.Test, false).then(
+ return allTests(out, c, Test, false).then(
function(cl)
{
return cl.shutdown();
@@ -100,8 +96,10 @@
});
});
};
- global.__test__ = run
- global.__clientAllTests__ = allTests;
- global.__runServer__ = true;
-
-}(typeof (global) === "undefined" ? window : global));
+ exports.__test__ = run
+ exports.__clientAllTests__ = allTests;
+ exports.__runServer__ = true;
+}
+(typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? module : undefined,
+ typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? require : window.Ice.__require,
+ typeof(global) !== "undefined" && typeof(global.process) !== "undefined" ? exports : window));