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

Commit

Permalink
feat: ipfs.shutdown test (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider authored and daviddias committed Feb 2, 2018
1 parent 9d91267 commit e911c6c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions js/src/miscellaneous.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,18 @@ module.exports = (common) => {
expect(res).to.exist()
})
})

it('.shutdown support', (done) => { // must be last test to run
// TODO: go-ipfs returns an error, https://github.com/ipfs/go-ipfs/issues/4078
ipfs.shutdown((err) => {
if (err && err.message !== 'read ECONNRESET') {
expect(err).to.not.exist()
}
ipfs.shutdown((err) => {
expect(err).to.exist()
done()
})
})
})
})
}

0 comments on commit e911c6c

Please sign in to comment.