From d99b7f4bbe600e684e090bc6420b6246b5f1f52e Mon Sep 17 00:00:00 2001 From: haad Date: Wed, 20 Nov 2019 13:06:15 +0200 Subject: [PATCH] Add description to timeout test fail --- test/log-load.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/log-load.spec.js b/test/log-load.spec.js index 2c862698..0f74bbc1 100644 --- a/test/log-load.spec.js +++ b/test/log-load.spec.js @@ -127,7 +127,7 @@ Object.keys(testAPIs).forEach((IPFS) => { const st = new Date().getTime() let log = await Log.fromJSON(ipfs, testIdentity, json, { logId: 'X', timeout }) const et = new Date().getTime() - assert.strictEqual((et - st) > timeout, true) + assert.strictEqual((et - st) > timeout, true, "" + (et-st) + " should be greater than timeout " + timeout) assert.strictEqual(log.length, 0) assert.deepStrictEqual(log.values.map(e => e.payload), []) }) @@ -178,7 +178,7 @@ Object.keys(testAPIs).forEach((IPFS) => { const st = new Date().getTime() let log = await Log.fromEntryHash(ipfs, testIdentity, 'zdpuAwNuRc2Kc1aNDdcdSWuxfNpHRJQw8L8APBNHCEFXbogus', { logId: 'X', timeout }) const et = new Date().getTime() - assert.strictEqual((et - st) > timeout, true) + assert.strictEqual((et - st) > timeout, true, "" + (et-st) + " should be greater than timeout " + timeout) assert.strictEqual(log.length, 0) assert.deepStrictEqual(log.values.map(e => e.payload), []) }) @@ -870,7 +870,7 @@ Object.keys(testAPIs).forEach((IPFS) => { const st = new Date().getTime() const log = await Log.fromEntry(ipfs, testIdentity, e, { timeout }) const et = new Date().getTime() - assert.strictEqual((et - st) > timeout, true) + assert.strictEqual((et - st) > timeout, true, "" + (et-st) + " should be greater than timeout " + timeout) assert.strictEqual(log.length, 1) assert.deepStrictEqual(log.values.map(e => e.payload), [e.payload]) })