Add failing spec for missing remote properties
This commit is contained in:
parent
4627311c34
commit
bc13536208
2 changed files with 15 additions and 0 deletions
|
@ -69,6 +69,10 @@ describe('ipc module', function () {
|
||||||
assert.ok(Object.keys(a.foo).includes('bar'))
|
assert.ok(Object.keys(a.foo).includes('bar'))
|
||||||
assert.ok(Object.keys(a.foo).includes('nested'))
|
assert.ok(Object.keys(a.foo).includes('nested'))
|
||||||
assert.ok(Object.keys(a.foo).includes('method1'))
|
assert.ok(Object.keys(a.foo).includes('method1'))
|
||||||
|
|
||||||
|
a = remote.require(path.join(fixtures, 'module', 'function-with-missing-properties.js'))
|
||||||
|
assert.equal(a.bar(), true)
|
||||||
|
assert.equal(typeof a.bar.baz, 'function')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should work with static class members', function () {
|
it('should work with static class members', function () {
|
||||||
|
|
11
spec/fixtures/module/function-with-missing-properties.js
vendored
Normal file
11
spec/fixtures/module/function-with-missing-properties.js
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
const foo = {}
|
||||||
|
|
||||||
|
foo.bar = function () {
|
||||||
|
return delete foo.bar.baz && delete foo.bar
|
||||||
|
}
|
||||||
|
|
||||||
|
foo.bar.baz = function () {
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = foo
|
Loading…
Add table
Add a link
Reference in a new issue