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 MylesBorins committed Oct 26, 2016
1 parent e069dc4 commit 2f458ea
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/parallel/test-zlib-create-raw.js
@@ -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 2f458ea

Please sign in to comment.