diff options
Diffstat (limited to 'js/test/Ice/operations/Oneways.js')
-rw-r--r-- | js/test/Ice/operations/Oneways.js | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/js/test/Ice/operations/Oneways.js b/js/test/Ice/operations/Oneways.js index 45b35fc2798..7664a52a85d 100644 --- a/js/test/Ice/operations/Oneways.js +++ b/js/test/Ice/operations/Oneways.js @@ -25,20 +25,18 @@ } catch(err) { - p.fail(err); + p.reject(err); throw err; } } }; - Ice.Promise.try( - function() + Ice.Promise.try(() => { prx = prx.ice_oneway(); return prx.ice_ping(); } - ).then( - function() + ).then(() => { try { @@ -49,6 +47,7 @@ { // Expected: twoway proxy required } + try { prx.ice_id(); @@ -58,6 +57,7 @@ { // Expected: twoway proxy required } + try { prx.ice_ids(); @@ -70,18 +70,9 @@ return prx.opVoid(); } - ).then( - function() - { - return prx.opIdempotent(); - } - ).then( - function() - { - return prx.opNonmutating(); - } - ).then( - function() + ).then(() => prx.opIdempotent() + ).then(() => prx.opNonmutating() + ).then(() => { try { @@ -93,15 +84,7 @@ // Expected: twoway proxy required } } - ).then( - function() - { - p.succeed(); - }, - function(ex) - { - p.fail(ex); - }); + ).then(p.resolve, p.reject); return p; }; |