Add tests for setting remote property null/undefined

This commit is contained in:
Kevin Sawicki 2017-04-03 14:26:39 -07:00
parent 7065123266
commit 746f636016

View file

@ -175,8 +175,14 @@ describe('ipc module', function () {
it('can change its properties', function () {
var property = remote.require(path.join(fixtures, 'module', 'property.js'))
assert.equal(property.property, 1127)
property.property = null
assert.equal(property.property, null)
property.property = undefined
assert.equal(property.property, undefined)
property.property = 1007
assert.equal(property.property, 1007)
assert.equal(property.getFunctionProperty(), 'foo-browser')
property.func.property = 'bar'
assert.equal(property.getFunctionProperty(), 'bar-browser')