Sha256: 1497150a759e2947c63c74dae561b66d14b0a8850a8d9b8509bd38f7dce95265
Contents?: true
Size: 746 Bytes
Versions: 5
Compression:
Stored size: 746 Bytes
Contents
'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'); const expected = /^TypeError: Not a string or buffer$/; assert.throws(() => { zlib.deflateSync(undefined); }, expected); assert.throws(() => { zlib.deflateSync(null); }, expected); assert.throws(() => { zlib.deflateSync(true); }, expected); assert.throws(() => { zlib.deflateSync(false); }, expected); assert.throws(() => { zlib.deflateSync(0); }, expected); assert.throws(() => { zlib.deflateSync(1); }, expected); assert.throws(() => { zlib.deflateSync([1, 2, 3]); }, expected); assert.throws(() => { zlib.deflateSync({foo: 'bar'}); }, expected);
Version data entries
5 entries across 4 versions & 1 rubygems