mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
662 B
29 lines
662 B
9 years ago
|
'use strict';
|
||
|
require('../common');
|
||
|
const assert = require('assert');
|
||
|
const zlib = require('zlib');
|
||
|
|
||
|
assert.doesNotThrow(() => {
|
||
|
zlib.createGzip({ flush: zlib.Z_SYNC_FLUSH });
|
||
|
});
|
||
|
|
||
|
assert.throws(() => {
|
||
|
zlib.createGzip({ flush: 'foobar' });
|
||
|
}, /Invalid flush flag: foobar/);
|
||
|
|
||
|
assert.throws(() => {
|
||
|
zlib.createGzip({ flush: 10000 });
|
||
|
}, /Invalid flush flag: 10000/);
|
||
|
|
||
|
assert.doesNotThrow(() => {
|
||
|
zlib.createGzip({ finishFlush: zlib.Z_SYNC_FLUSH });
|
||
|
});
|
||
|
|
||
|
assert.throws(() => {
|
||
|
zlib.createGzip({ finishFlush: 'foobar' });
|
||
|
}, /Invalid flush flag: foobar/);
|
||
|
|
||
|
assert.throws(() => {
|
||
|
zlib.createGzip({ finishFlush: 10000 });
|
||
|
}, /Invalid flush flag: 10000/);
|