mirror of
https://github.com/danbulant/pngjs
synced 2026-06-20 06:51:46 +00:00
This commit is contained in:
parent
90e00c07fd
commit
5d5f543c41
2 changed files with 12 additions and 1 deletions
|
|
@ -140,7 +140,6 @@ ParserAsync.prototype._finished = function() {
|
|||
// no more data to inflate
|
||||
this._inflate.end();
|
||||
}
|
||||
this.destroySoon();
|
||||
};
|
||||
|
||||
ParserAsync.prototype._complete = function(filteredData) {
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue