Added zlib stream methods/properties

This commit is contained in:
Gustaf Räntilä
2017-12-13 13:57:49 +01:00
parent 57d67975c7
commit 784a62737e
2 changed files with 24 additions and 7 deletions

View File

@@ -798,13 +798,16 @@ function stream_readable_pipe_test() {
var z = zlib.createGzip({ finishFlush: zlib.constants.Z_FINISH });
var w = fs.createWriteStream('file.txt.gz');
assert(typeof z.bytesRead === 'number');
assert(typeof r.bytesRead === 'number');
assert(typeof r.path === 'string');
assert(rs.path instanceof Buffer);
r.pipe(z).pipe(w);
z.flush();
r.close();
z.close();
rs.close();
}