Skip to content

Commit 9ca8561

Browse files
committed
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.
1 parent f6e33ef commit 9ca8561

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict';
2+
3+
// Check the error condition testing for passing something other than a string
4+
// or buffer.
5+
6+
require('../common');
7+
const assert = require('assert');
8+
const zlib = require('zlib');
9+
10+
// Passing nothing (undefined) instead of string/buffer to `zlib.deflateSync()`
11+
assert.throws(zlib.deflateSync, /^TypeError: Not a string or buffer$/);

0 commit comments

Comments
 (0)