diff options
author | Mithun Sasidharan <mithunsasidharan89@gmail.com> | 2017-12-06 22:16:44 +0530 |
---|---|---|
committer | Anatoli Papirovski <apapirovski@mac.com> | 2017-12-08 16:02:07 -0500 |
commit | eae0c05697121aaae4b097f34d30a259c8591af1 (patch) | |
tree | 5a249a64f5309a1865e6f1540a39264eb7b898f9 /test/parallel/test-http2-misused-pseudoheaders.js | |
parent | 20d6b8c6c01c09a51f503f7f8a0fee494be6f742 (diff) | |
download | android-node-v8-eae0c05697121aaae4b097f34d30a259c8591af1.tar.gz android-node-v8-eae0c05697121aaae4b097f34d30a259c8591af1.tar.bz2 android-node-v8-eae0c05697121aaae4b097f34d30a259c8591af1.zip |
test: replace assert.throws w/ common.expectsError
PR-URL: https://github.com/nodejs/node/pull/17498
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Diffstat (limited to 'test/parallel/test-http2-misused-pseudoheaders.js')
-rw-r--r-- | test/parallel/test-http2-misused-pseudoheaders.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/parallel/test-http2-misused-pseudoheaders.js b/test/parallel/test-http2-misused-pseudoheaders.js index 2ccb676b21..1f501598c1 100644 --- a/test/parallel/test-http2-misused-pseudoheaders.js +++ b/test/parallel/test-http2-misused-pseudoheaders.js @@ -3,7 +3,6 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); -const assert = require('assert'); const h2 = require('http2'); const server = h2.createServer(); @@ -19,10 +18,10 @@ function onStream(stream, headers, flags) { ':method', ':scheme' ].forEach((i) => { - assert.throws(() => stream.respond({ [i]: '/' }), - common.expectsError({ - code: 'ERR_HTTP2_INVALID_PSEUDOHEADER' - })); + common.expectsError(() => stream.respond({ [i]: '/' }), + { + code: 'ERR_HTTP2_INVALID_PSEUDOHEADER' + }); }); stream.respond({ |