Skip to content

Commit

Permalink
test: add test for zlib.create*Raw()
Browse files Browse the repository at this point in the history
Currently, there are no tests that exercise `zlib.createInflateRaw()` or
`zlib.createDeflateRaw()`.

This adds minimal tests that invoke the functions and confirm that they
return `zlib.InflateRaw`/`zlib.DeflateRaw` objects.

PR-URL: nodejs#8306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott committed Aug 31, 2016
1 parent eca74a9 commit f6e33ef
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/parallel/test-zlib-create-raw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use strict';

require('../common');
const assert = require('assert');
const zlib = require('zlib');

{
const inflateRaw = zlib.createInflateRaw();
assert(inflateRaw instanceof zlib.InflateRaw);
}

{
const deflateRaw = zlib.createDeflateRaw();
assert(deflateRaw instanceof zlib.DeflateRaw);
}

0 comments on commit f6e33ef

Please sign in to comment.