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

fix: update error messages in line with go #348

Merged
merged 1 commit into from
Aug 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/src/files/read-readable-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = (createCommon, options) => {

const stream = ipfs.files.readReadableStream(`${testDir}/404`)

stream.on('error', (err) => {
stream.once('error', (err) => {
expect(err).to.exist()
expect(err.message).to.contain('does not exist')
done()
Expand Down
4 changes: 2 additions & 2 deletions js/src/files/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ module.exports = (createCommon, options) => {
it('should not read not found, expect error', (done) => {
const testDir = `/test-${hat()}`

ipfs.files.read(`${testDir}/404`, (err, buf) => {
ipfs.files.read(`${testDir}/404`, (err) => {
expect(err).to.exist()
expect(buf).to.not.exist()
expect(err.message).to.contain('does not exist')
done()
})
})
Expand Down