Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Commit

Permalink
Add description to timeout test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
haad committed Nov 20, 2019
1 parent d4b519e commit d99b7f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/log-load.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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), [])
})
Expand Down Expand Up @@ -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), [])
})
Expand Down Expand Up @@ -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])
})
Expand Down

0 comments on commit d99b7f4

Please sign in to comment.