aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-http-request-invalid-method-error.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-http-request-invalid-method-error.js')
-rw-r--r--test/parallel/test-http-request-invalid-method-error.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/parallel/test-http-request-invalid-method-error.js b/test/parallel/test-http-request-invalid-method-error.js
index d5dffdd221..457e90fd48 100644
--- a/test/parallel/test-http-request-invalid-method-error.js
+++ b/test/parallel/test-http-request-invalid-method-error.js
@@ -4,7 +4,10 @@ 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' })
+ () => http.request({ method: '\0' }),
+ common.expectsError({
+ code: 'ERR_INVALID_HTTP_TOKEN',
+ type: TypeError,
+ message: 'Method must be a valid HTTP token'
+ })
);