diff options
author | Mithun Sasidharan <mithunsasidharan89@gmail.com> | 2017-12-06 21:08:06 +0530 |
---|---|---|
committer | Anatoli Papirovski <apapirovski@mac.com> | 2017-12-08 13:37:33 -0500 |
commit | acd427713422138a92f74a4c3c2a1f6d8ecf9778 (patch) | |
tree | 005ed9f2b3382df5bc2cb4e4e4af6164815c4c4d /test/parallel/test-http-request-invalid-method-error.js | |
parent | 20a8e83e44a6555a40c9d5f367a9a7be8fed0374 (diff) | |
download | android-node-v8-acd427713422138a92f74a4c3c2a1f6d8ecf9778.tar.gz android-node-v8-acd427713422138a92f74a4c3c2a1f6d8ecf9778.tar.bz2 android-node-v8-acd427713422138a92f74a4c3c2a1f6d8ecf9778.zip |
test: replace assert.throws w/ common.expectsError
PR-URL: https://github.com/nodejs/node/pull/17497
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-http-request-invalid-method-error.js')
-rw-r--r-- | test/parallel/test-http-request-invalid-method-error.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/parallel/test-http-request-invalid-method-error.js b/test/parallel/test-http-request-invalid-method-error.js index 59706e90c7..ae11985e12 100644 --- a/test/parallel/test-http-request-invalid-method-error.js +++ b/test/parallel/test-http-request-invalid-method-error.js @@ -1,13 +1,12 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); const http = require('http'); -assert.throws( +common.expectsError( () => http.request({ method: '\0' }), - common.expectsError({ + { code: 'ERR_INVALID_HTTP_TOKEN', type: TypeError, message: 'Method must be a valid HTTP token ["\u0000"]' - }) + } ); |