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

Commit 13f2432

Browse files
committed
test: files.add fails in invalid input
1 parent df9fc54 commit 13f2432

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/files.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,15 @@ module.exports = (common) => {
202202
})
203203
})
204204
})
205+
206+
it('fails in invalid input', (done) => {
207+
const nonValid = 'sfdasfasfs'
208+
209+
ipfs.files.add(nonValid, (err, result) => {
210+
expect(err).to.exist
211+
done()
212+
})
213+
})
205214
})
206215

207216
describe('.cat', () => {

0 commit comments

Comments
 (0)