-
Notifications
You must be signed in to change notification settings - Fork 20
Conversation
function Exporter (hash, dagService, options) { | ||
Readable.call(this, { objectMode: true }) | ||
|
||
if (!(this instanceof Exporter)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be leaking memory in a weird way if this check doesn't come before the Readable.call(...)
line.
|
||
function fileExporter (node, name, dir, callback) { | ||
this.fileExporter = (node, name, dir, callback) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why this function news to be exposed on the instantiated Object?
CR'ed :) |
const ds = new DAGService(bs) | ||
const testExport = exporter(hash, ds) | ||
testExport.on('error', (err) => { | ||
expect(err).to.exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we check that it's the error we're expecting?
One comment, but otherwise 🐴 LGTM |
@@ -78,5 +87,16 @@ module.exports = function (repo) { | |||
done() | |||
}, 1000) | |||
}) | |||
|
|||
it('expect a dag service error over stream', (done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/'expect a dag service error over stream'/'fails on non existent hash'
@nginnever squash the 'updates commit' and update the README, then we are all set :) |
ed6a280
to
984b42d
Compare
Awesome! :D |
Niiice |
cc @diasdavid @dignifiedquire could use a look at this :D