Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: test non-buffer/string with zlib
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
commit 9ca85614630905f74ad4cb271348deafeddb3065
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$/);