Add failing spec for reassigning remote function

This commit is contained in:
Kevin Sawicki 2016-03-04 15:43:51 -08:00
parent ee1f69062e
commit a9e22801e9
2 changed files with 9 additions and 0 deletions

View file

@ -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
View file

@ -0,0 +1 @@
exports.aFunction = function() { return 1127; };