summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-request-invalid-method-error.js
blob: d5dffdd2212da993541829df6c24e198e4deec5d (plain)
1
2
3
4
5
6
7
8
9
10
'use strict';
const common = require('../common');
const assert = require('assert');
const http = require('http');

assert.throws(
  () => { http.request({ method: '\0' }); },
  common.expectsError({ type: TypeError,
                        message: 'Method must be a valid HTTP token' })
);