Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 61b4c15

Browse files
committedOct 13, 2015
add test for reading a non existent file
1 parent fc40dba commit 61b4c15

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed
 

‎test/test.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,20 @@ describe('ipfs node api', function () {
370370
})
371371
})
372372

373+
it('files.read for file that does not exist', function (done) {
374+
this.timeout(20000)
375+
376+
ipfs.files.read('/test-folder/test-file-not-exist', function (err, stream) {
377+
if (err) {
378+
done()
379+
}
380+
})
381+
})
382+
373383
it('files.write', function (done) {
374384
this.timeout(20000)
375385

376386
ipfs.files.write('/test-folder/test-file', new Buffer('bananas'), function (err) {
377-
console.log('->', err)
378387
if (err) {
379388
throw err
380389
}

0 commit comments

Comments
 (0)
This repository has been archived.