Use Proxy for accessing properties of remote function

This commit is contained in:
Kevin Sawicki 2016-08-16 13:54:21 -07:00
parent 8b38018ab4
commit d226b7bc6c
4 changed files with 25 additions and 28 deletions

View file

@ -59,9 +59,11 @@ describe('ipc module', function () {
a = remote.require(path.join(fixtures, 'module', 'function-with-properties.js'))
assert.equal(typeof a, 'object')
assert.equal(typeof a.foo, 'function')
assert.equal(a.foo(), 'hello')
assert.equal(a.foo.bar, 'baz')
assert.equal(a.foo.nested.prop, 'yes')
assert.equal(a.foo.method1(), 'world')
assert.equal(a.foo.method1.prop1(), 123)
})
it('should work with static class members', function () {