summaryrefslogtreecommitdiff
path: root/js/test/Slice/macros/Client.js
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-04-30 21:10:23 +0200
committerJose <jose@zeroc.com>2018-04-30 21:10:23 +0200
commit530608e4ce63dd36d1659b58d1a3fb7fdcf56bea (patch)
treeb5195405b16dd31ac1c486daf7f3ff2572ce6499 /js/test/Slice/macros/Client.js
parentAllow FileParser.Endpoints to be set via Ice::Properties (#58) (diff)
downloadice-530608e4ce63dd36d1659b58d1a3fb7fdcf56bea.tar.bz2
ice-530608e4ce63dd36d1659b58d1a3fb7fdcf56bea.tar.xz
ice-530608e4ce63dd36d1659b58d1a3fb7fdcf56bea.zip
Fix JavaScript errors and warnings report by ESLINT
Close #28
Diffstat (limited to 'js/test/Slice/macros/Client.js')
-rw-r--r--js/test/Slice/macros/Client.js41
1 files changed, 24 insertions, 17 deletions
diff --git a/js/test/Slice/macros/Client.js b/js/test/Slice/macros/Client.js
index 5c6dbca9709..23ac3d78639 100644
--- a/js/test/Slice/macros/Client.js
+++ b/js/test/Slice/macros/Client.js
@@ -18,29 +18,36 @@
{
throw new Error("test failed");
}
- };
+ }
- async function run(out)
+ function run(out)
{
- out.write("testing Slice predefined macros... ");
+ try
+ {
+ out.write("testing Slice predefined macros... ");
- let d = new Test._Default();
- test(d.x == 10);
- test(d.y == 10);
+ const d = new Test._Default();
+ test(d.x == 10);
+ test(d.y == 10);
- let nd = new Test.NoDefault();
- test(nd.x != 10);
- test(nd.y != 10);
+ const nd = new Test.NoDefault();
+ test(nd.x != 10);
+ test(nd.y != 10);
- let c = new Test.JsOnly();
- test(c.lang == "js");
- test(c.version == Ice.intVersion());
+ const c = new Test.JsOnly();
+ test(c.lang == "js");
+ test(c.version == Ice.intVersion());
- out.writeLine("ok");
+ out.writeLine("ok");
+ return Promise.resolve();
+ }
+ catch(ex)
+ {
+ return Promise.reject(ex);
+ }
}
exports._test = run;
-}
-(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" ? module : undefined,
+ typeof global !== "undefined" && typeof global.process !== "undefined" ? require : this.Ice._require,
+ typeof global !== "undefined" && typeof global.process !== "undefined" ? exports : this));