зеркало из https://github.com/electron/electron.git
Allow spec to be run multiple times in same runner
This commit is contained in:
Родитель
359ab2f9b3
Коммит
f792c720f4
|
@ -70,7 +70,7 @@ describe('ipc module', function () {
|
|||
assert.ok(Object.keys(a.foo).includes('nested'))
|
||||
assert.ok(Object.keys(a.foo).includes('method1'))
|
||||
|
||||
a = remote.require(path.join(fixtures, 'module', 'function-with-missing-properties.js'))
|
||||
a = remote.require(path.join(fixtures, 'module', 'function-with-missing-properties.js')).setup()
|
||||
assert.equal(a.bar(), true)
|
||||
assert.equal(typeof a.bar.baz, 'function')
|
||||
})
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
const foo = {}
|
||||
exports.setup = function () {
|
||||
const foo = {}
|
||||
|
||||
foo.bar = function () {
|
||||
return delete foo.bar.baz && delete foo.bar
|
||||
foo.bar = function () {
|
||||
return delete foo.bar.baz && delete foo.bar
|
||||
}
|
||||
|
||||
foo.bar.baz = function () {
|
||||
return 3
|
||||
}
|
||||
|
||||
return foo
|
||||
}
|
||||
|
||||
foo.bar.baz = function () {
|
||||
return 3
|
||||
}
|
||||
|
||||
module.exports = foo
|
||||
|
|
Загрузка…
Ссылка в новой задаче