Add more cycle tests

This commit is contained in:
Kevin Sawicki 2016-07-11 10:49:23 -07:00
parent 00f82aaffe
commit 2d9391f7d7

View file

@ -70,6 +70,12 @@ describe('ipc module', function () {
{bar: [1, 2, 3]}
])
objectA = {foo: 'bar'}
assert.deepEqual(a.returnArgs({foo: objectA}, {bar: objectA}), [
{foo: {foo: 'bar'}},
{bar: {foo: 'bar'}}
])
arrayA = []
arrayA.push(arrayA)
assert.deepEqual(a.returnArgs(arrayA), [
@ -78,14 +84,16 @@ describe('ipc module', function () {
objectA = {}
objectA.foo = objectA
objectA.bar = 'baz'
assert.deepEqual(a.returnArgs(objectA), [
{foo: null}
{foo: null, bar: 'baz'}
])
objectA = {}
objectA.foo = {bar: objectA}
objectA.bar = 'baz'
assert.deepEqual(a.returnArgs(objectA), [
{foo: {bar: null}}
{foo: {bar: null}, bar: 'baz'}
])
})
})