From b8dd9992a5a316b8c8c94b79353796ec7dedcea9 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Thu, 17 Oct 2019 17:56:08 +0100 Subject: [PATCH] fix: fix failing test --- test/cli/ls.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/cli/ls.js b/test/cli/ls.js index 2575be1fe3..1491db3cec 100644 --- a/test/cli/ls.js +++ b/test/cli/ls.js @@ -76,16 +76,10 @@ describe('ls', () => runOnAndOff((thing) => { }) it('prints nothing for non-existant hashes', async function () { - if (thing.on) { - // If the daemon is on, ls should search until it hits a timeout - await Promise.race([ - ipfs('ls QmYmW4HiZhotsoSqnv2o1oSssvkRM8b9RweBoH7ao5nki2'), - delay(4000) - ]) - } else { - // If the daemon is off, ls should fail - await ipfs.fail('ls QmYmW4HiZhotsoSqnv2o1oSssvkRM8b9RweBoH7ao5nki2') - } + await Promise.race([ + ipfs.fail('ls QmYmW4HiZhotsoSqnv2o1oSssvkRM8b9RweBoH7ao5nki2'), + delay(4000) + ]) }) it('adds a header, -v', function () {