Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 4290256

Browse files
wraithgaralanshaw
authored andcommitted
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 <[email protected]>
1 parent 45b705d commit 4290256

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/cli/bitswap.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ describe('bitswap', () => runOn((thing) => {
4141
this.timeout(20 * 1000)
4242

4343
return ipfs('bitswap stat').then((out) => {
44-
expect(out).to.be.eql([
44+
expect(out).to.include([
4545
'bitswap status',
4646
' blocks received: 0',
4747
' dup blocks received: 0',
4848
' dup data received: 0B',
4949
' wantlist [1 keys]',
5050
` ${key}`,
51-
' partners [0]',
52-
' '
53-
].join('\n') + '\n')
51+
// We sometimes pick up partners while the tests run so our assertion ends here
52+
' partners'
53+
].join('\n'))
5454
})
5555
})
5656

0 commit comments

Comments
 (0)