mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
15 lines
364 B
JavaScript
15 lines
364 B
JavaScript
|
'use strict';
|
||
|
|
||
|
require('../common');
|
||
|
const assert = require('assert');
|
||
|
const ClientRequest = require('http').ClientRequest;
|
||
|
|
||
|
{
|
||
|
assert.throws(() => {
|
||
|
new ClientRequest({ insecureHTTPParser: 'wrongValue' });
|
||
|
}, {
|
||
|
code: 'ERR_INVALID_ARG_TYPE',
|
||
|
message: /insecureHTTPParser/
|
||
|
}, 'http request should throw when passing invalid insecureHTTPParser');
|
||
|
}
|