blob: 08c79f138b5a5831844a9e773a09748fca344565 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
'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/);
|