From 2d9391f7d76d207cc5a63b9995e8e522616f2a61 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 11 Jul 2016 10:49:23 -0700 Subject: [PATCH] Add more cycle tests --- spec/api-ipc-spec.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/spec/api-ipc-spec.js b/spec/api-ipc-spec.js index 9644a3dc4..bd1a7e3d8 100644 --- a/spec/api-ipc-spec.js +++ b/spec/api-ipc-spec.js @@ -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'} ]) }) })