Add failing spec for reassigning remote function
This commit is contained in:
parent
ee1f69062e
commit
a9e22801e9
2 changed files with 9 additions and 0 deletions
|
@ -63,6 +63,14 @@ describe('ipc module', function() {
|
|||
var obj = new call.constructor;
|
||||
assert.equal(obj.test, 'test');
|
||||
});
|
||||
|
||||
it('can reassign its member functions', function() {
|
||||
var remoteFunctions = remote.require(path.join(fixtures, 'module', 'function.js'));
|
||||
assert.equal(remoteFunctions.aFunction(), 1127);
|
||||
|
||||
remoteFunctions.aFunction = function () { return 1234; };
|
||||
assert.equal(remoteFunctions.aFunction(), 1234);
|
||||
});
|
||||
});
|
||||
|
||||
describe('remote value in browser', function() {
|
||||
|
|
1
spec/fixtures/module/function.js
vendored
Normal file
1
spec/fixtures/module/function.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
exports.aFunction = function() { return 1127; };
|
Loading…
Reference in a new issue