Add spec for remote callback length
This commit is contained in:
parent
37db804099
commit
6b56dfd94b
2 changed files with 10 additions and 0 deletions
|
@ -85,6 +85,13 @@ describe('ipc module', function () {
|
|||
assert.equal(foo.baz(), 123)
|
||||
})
|
||||
|
||||
it('includes the length of functions specified as arguments', function () {
|
||||
var a = remote.require(path.join(fixtures, 'module', 'function-with-args.js'))
|
||||
assert.equal(a(function (a, b, c, d, f) {}), 5)
|
||||
assert.equal(a((a) => {}), 1)
|
||||
assert.equal(a((...args) => {}), 0)
|
||||
})
|
||||
|
||||
it('handles circular references in arrays and objects', function () {
|
||||
var a = remote.require(path.join(fixtures, 'module', 'circular.js'))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue