mirror of
https://github.com/electron/electron.git
synced 2026-01-25 15:28:11 -05:00
Add asserts for properties
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user