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: #8306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and Myles Borins committed Sep 30, 2016
1 parent 11efbe8 commit 55a92b1
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 55a92b1

Please sign in to comment.