mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add failing spec for reassigning remote function
This commit is contained in:
@@ -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; };
|
||||
Reference in New Issue
Block a user