diff options
-rw-r--r-- | src/test.js | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/src/test.js b/src/test.js index f0d1431..1c34e5f 100644 --- a/src/test.js +++ b/src/test.js @@ -29,16 +29,36 @@ describe('iii-client:', () => { }); it('connect():', (done) => { - connect(uuid, (request) => { - assert.isObject(request); - done(); - }); + var value = 0; + var test = () => { + connect(uuid, (request) => { + if (!typeof request === 'object' && value++ < 5) { + test(); + } + else { + assert.isObject(request); + done(); + } + }); + } + + test(); }); it('send():', (done) => { - send(uuid, text, (request) => { - assert.isObject(request); - done(); - }); + var value = 0; + var test = () => { + send(uuid, text, (request) => { + if (!typeof request === 'object' && value++ < 5) { + test(); + } + else { + assert.isObject(request); + done(); + } + }); + } + + test(); }); });
\ No newline at end of file |