Enable creating object from remote object's member.

This commit is contained in:
Cheng Zhao 2013-08-25 20:44:52 +08:00
parent c86acc4cd7
commit 9e16e41bb3
4 changed files with 30 additions and 4 deletions

View file

@ -35,6 +35,11 @@ describe 'ipc', ->
# Restore.
property.property = 1127
it 'can construct an object from its member', ->
call = remote.require path.join(fixtures, 'module', 'call.js')
obj = new call.constructor
assert.equal obj.test, 'test'
describe 'remote value in browser', ->
it 'keeps its constructor name for objects', ->
buf = new Buffer('test')