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

Commit

Permalink
fix: update error messages in line with go
Browse files Browse the repository at this point in the history
Js says 'file did not exist', go says 'file does not exist'.
  • Loading branch information
achingbrain committed Aug 7, 2018
1 parent bfdda8a commit 3e948e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 3e948e8

Please sign in to comment.