mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
c925039b35
PR-URL: https://github.com/nodejs/node/pull/33633 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: James M Snell <jasnell@gmail.com>
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');
|
|
}
|