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

Commit

Permalink
fix: don't error to specific
Browse files Browse the repository at this point in the history
When stopping an IPFS node it returns an error. The error message
depends on the environment. In Browsers it might also return
`Failed to fetch` or `XHR error`. Hence removing the specific
error check as it would fail for Browsers.
  • Loading branch information
vmx committed Mar 9, 2018
1 parent c4934ca commit ba0f20c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions js/src/miscellaneous.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,11 @@ module.exports = (common) => {
})

// must be last test to run
it('.stop', (done) => {
it('.stop', function (done) {
this.timeout(10 * 1000)
// TODO: go-ipfs returns an error, https://github.com/ipfs/go-ipfs/issues/4078
ipfs.stop((err) => {
if (err && err.message !== 'read ECONNRESET') {
expect(err).to.not.exist()
}
// Retry
ipfs.stop((err) => {
expect(err).to.exist()
done()
Expand Down

0 comments on commit ba0f20c

Please sign in to comment.