1'use strict';
2
3require('../common');
4
5// This test ensures that the BrotliCompress function throws
6// ERR_INVALID_ARG_TYPE when the values of the `params` key-value object are
7// neither numbers nor booleans.
8
9const assert = require('assert');
10const { BrotliCompress, constants } = require('zlib');
11
12const opts = {
13  params: {
14    [constants.BROTLI_PARAM_MODE]: 'lol'
15  }
16};
17
18assert.throws(() => BrotliCompress(opts), {
19  code: 'ERR_INVALID_ARG_TYPE'
20});
21