We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6e33ef commit 9ca8561Copy full SHA for 9ca8561
test/parallel/test-zlib-not-string-or-buffer.js
@@ -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