Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
fix: linting errors
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
  • Loading branch information
alanshaw committed Jun 18, 2018
1 parent 7737546 commit fcc834c
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions js/src/bitswap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-env mocha */
'use strict'

const chai = require('chai')
Expand Down Expand Up @@ -60,7 +61,7 @@ module.exports = (common) => {
it('.wantlist', (done) => {
ipfsB.bitswap.wantlist((err, list) => {
expect(err).to.not.exist()
expect(list.Keys).to.have.length(1);
expect(list.Keys).to.have.length(1)
expect(list.Keys[0]['/']).to.equal(key)
done()
})
Expand All @@ -79,9 +80,9 @@ module.exports = (common) => {
this.skip()
}
ipfsB.bitswap.unwant(key, (err) => {
expect(err).to.not.exist();
expect(err).to.not.exist()
ipfsB.bitswap.wantlist((err, list) => {
expect(err).to.not.exist();
expect(err).to.not.exist()
expect(list.Keys).to.be.empty()
done()
})
Expand Down Expand Up @@ -119,8 +120,8 @@ module.exports = (common) => {
it('.stat gives error while offline', (done) => {
ipfs.bitswap.stat((err, stats) => {
expect(err).to.exist()
//When run against core we get our expected error, when run
//as part of the http tests we get a connection refused
// When run against core we get our expected error, when run
// as part of the http tests we get a connection refused
if (err.code !== 'ECONNREFUSED') {
expect(err).to.match(/online mode/)
}
Expand All @@ -132,8 +133,8 @@ module.exports = (common) => {
it('.wantlist gives error if offline', (done) => {
ipfs.bitswap.wantlist((err, list) => {
expect(err).to.exist()
//When run against core we get our expected error, when run
//as part of the http tests we get a connection refused
// When run against core we get our expected error, when run
// as part of the http tests we get a connection refused
if (err.code !== 'ECONNREFUSED') {
expect(err).to.match(/online mode/)
}
Expand All @@ -146,8 +147,8 @@ module.exports = (common) => {
const key = 'QmUBdnXXPyoDFXj3Hj39dNJ5VkN3QFRskXxcGaYFBB8CNR'
ipfs.bitswap.unwant(key, (err) => {
expect(err).to.exist()
//When run against core we get our expected error, when run
//as part of the http tests we get a connection refused
// When run against core we get our expected error, when run
// as part of the http tests we get a connection refused
if (err.code !== 'ECONNREFUSED') {
expect(err).to.match(/online mode/)
}
Expand Down

0 comments on commit fcc834c

Please sign in to comment.