1'use strict';
2
3require('../common');
4
5const assert = require('assert');
6const http = require('http');
7
8{
9
10  const options = {
11    port: '80',
12    path: '/',
13    headers: {
14      host: []
15    }
16  };
17
18  assert.throws(() => {
19    http.request(options);
20  }, {
21    code: /ERR_INVALID_ARG_TYPE/
22  }, 'http request should throw when passing array as header host');
23}
24