From 1f149d62c209f056d8167ede1ebce190513eb384 Mon Sep 17 00:00:00 2001 From: Lynn Date: Fri, 24 Mar 2017 16:18:09 -0700 Subject: [PATCH] fix test failures for newer ver of node (#42) --- js/preload/createProxy.js | 4 +++- tests/apiTests/proxy-polyfill.js | 2 ++ tests/apiTests/proxyAPI.test.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/preload/createProxy.js b/js/preload/createProxy.js index ca994b26..1c555a50 100644 --- a/js/preload/createProxy.js +++ b/js/preload/createProxy.js @@ -234,7 +234,6 @@ function getHandler(target, property, isStatic) { function instanceSetHandler(target, property, value) { let prototype = Object.getPrototypeOf(target); let desc = Object.getOwnPropertyDescriptor(prototype, property); - if (desc && desc.set) { var args = { objId: target._objId, @@ -243,7 +242,10 @@ function instanceSetHandler(target, property, value) { } ipcRenderer.sendSync(proxyCmds.set, args); + return true; } + + return false; } function staticGetHandler(target, name) { diff --git a/tests/apiTests/proxy-polyfill.js b/tests/apiTests/proxy-polyfill.js index ad14d0c8..d28ad38e 100644 --- a/tests/apiTests/proxy-polyfill.js +++ b/tests/apiTests/proxy-polyfill.js @@ -19,6 +19,8 @@ * the License. */ +// note: polyfill here can be removed when everyone is using node >= 6.4.0 + 'use strict'; (function(scope) { diff --git a/tests/apiTests/proxyAPI.test.js b/tests/apiTests/proxyAPI.test.js index da319531..2e93f3a6 100644 --- a/tests/apiTests/proxyAPI.test.js +++ b/tests/apiTests/proxyAPI.test.js @@ -289,7 +289,7 @@ describe('proxy destroy tests...', function() { }); }); - test('destroy from implementation side', function() { + test('destroy from implementation side', function(done) { inst.close(); inst.getArg1()