smallnamespace 2020-04-09 06:50:37 -07:00 committed by GitHub
parent 90e00c07fd
commit 5d5f543c41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -140,7 +140,6 @@ ParserAsync.prototype._finished = function() {
// no more data to inflate
this._inflate.end();
}
this.destroySoon();
};
ParserAsync.prototype._complete = function(filteredData) {

View file

@ -346,3 +346,15 @@ test("should set alpha=true in metadata for images with tRNS chunk", function (t
t.end();
});
});
test("Should parse with low highWaterMark", function (t) {
fs.createReadStream(path.join(__dirname, "in", "tbbn0g04.png"), { highWaterMark: 2 })
.pipe(new PNG())
.on('parsed', function () {
t.pass("Image should have parsed");
t.end();
})
.on('error', function (e) {
t.error(e, "Should not error");
});
});