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

Commit e911c6c

Browse files
richardschneiderdaviddias
authored andcommitted
feat: ipfs.shutdown test (#214)
1 parent 9d91267 commit e911c6c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: js/src/miscellaneous.js

+13
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,18 @@ module.exports = (common) => {
8181
expect(res).to.exist()
8282
})
8383
})
84+
85+
it('.shutdown support', (done) => { // must be last test to run
86+
// TODO: go-ipfs returns an error, https://github.com/ipfs/go-ipfs/issues/4078
87+
ipfs.shutdown((err) => {
88+
if (err && err.message !== 'read ECONNRESET') {
89+
expect(err).to.not.exist()
90+
}
91+
ipfs.shutdown((err) => {
92+
expect(err).to.exist()
93+
done()
94+
})
95+
})
96+
})
8497
})
8598
}

0 commit comments

Comments
 (0)