Add asserts for properties

This commit is contained in:
Kevin Sawicki 2016-05-27 10:52:56 -07:00
parent 59dd7ca9df
commit fc4b224dec
2 changed files with 7 additions and 6 deletions

View file

@ -32,9 +32,10 @@ describe('ipc module', function () {
assert.equal(a.id, 1127)
})
it('should work when object has no prototype', function () {
it.only('should work when object has no prototype', function () {
var a = remote.require(path.join(fixtures, 'module', 'no-prototype.js'))
assert.deepEqual(a.foo, {})
assert.equal(a.foo.bar, 'baz')
assert.equal(a.foo.baz, false)
assert.equal(a.bar, 1234)
})

View file

@ -1,4 +1,4 @@
module.exports = {
foo: Object.create(null),
bar: 1234
}
const foo = Object.create(null)
foo.bar = 'baz'
foo.baz = false
module.exports = {foo: foo, bar: 1234}