Skip to content

Commit

Permalink
test: test non-buffer/string with zlib
Browse files Browse the repository at this point in the history
Check the error condition testing for passing something other than a
string or buffer. Currently, there are no tests for this.
  • Loading branch information
Trott committed Aug 31, 2016
1 parent f6e33ef commit 9ca8561
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/parallel/test-zlib-not-string-or-buffer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

// Check the error condition testing for passing something other than a string
// or buffer.

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

// Passing nothing (undefined) instead of string/buffer to `zlib.deflateSync()`
assert.throws(zlib.deflateSync, /^TypeError: Not a string or buffer$/);

0 comments on commit 9ca8561

Please sign in to comment.