From 4290256d382b198f0bbc4a8ff1b83adc9fe2a09e Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 21 Jun 2018 07:03:05 -0700 Subject: [PATCH] fix(tests): loosen assertion for bitswap.stat test (#1404) * fix: loosen assertion for bitswap.stat test Sometimes we pick up partners during the test so we can't reliably assert that part of the output * fix: remove unnecesary newline in bitswap.stat CLI test License: MIT Signed-off-by: Alan Shaw --- test/cli/bitswap.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/cli/bitswap.js b/test/cli/bitswap.js index 8b6b8eea2a..0f109df16d 100644 --- a/test/cli/bitswap.js +++ b/test/cli/bitswap.js @@ -41,16 +41,16 @@ describe('bitswap', () => runOn((thing) => { this.timeout(20 * 1000) return ipfs('bitswap stat').then((out) => { - expect(out).to.be.eql([ + expect(out).to.include([ 'bitswap status', ' blocks received: 0', ' dup blocks received: 0', ' dup data received: 0B', ' wantlist [1 keys]', ` ${key}`, - ' partners [0]', - ' ' - ].join('\n') + '\n') + // We sometimes pick up partners while the tests run so our assertion ends here + ' partners' + ].join('\n')) }) })