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

Commit

Permalink
fix(tests): loosen assertion for bitswap.stat test (#1404)
Browse files Browse the repository at this point in the history
* 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 <alan@tableflip.io>
  • Loading branch information
wraithgar authored and alanshaw committed Jun 21, 2018
1 parent 45b705d commit 4290256
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/cli/bitswap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
})
})

Expand Down

0 comments on commit 4290256

Please sign in to comment.