Add asserts for properties
This commit is contained in:
parent
59dd7ca9df
commit
fc4b224dec
2 changed files with 7 additions and 6 deletions
|
@ -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)
|
||||
})
|
||||
|
||||
|
|
8
spec/fixtures/module/no-prototype.js
vendored
8
spec/fixtures/module/no-prototype.js
vendored
|
@ -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}
|
||||
|
|
Loading…
Add table
Reference in a new issue