diff options
author | Anatoli Papirovski <apapirovski@mac.com> | 2017-12-08 16:41:38 -0500 |
---|---|---|
committer | Anatoli Papirovski <apapirovski@mac.com> | 2017-12-11 18:21:58 -0500 |
commit | 094bfaf769f5b6bc8ca6fbcc289cdf5e0f07073f (patch) | |
tree | 5fa840b303201b1f5375302bbf06cedc42f5a5c0 /test/parallel/test-http2-client-request-options-errors.js | |
parent | 4df7c190bf449e3d0d8877f45bb7490d7a801118 (diff) | |
download | android-node-v8-094bfaf769f5b6bc8ca6fbcc289cdf5e0f07073f.tar.gz android-node-v8-094bfaf769f5b6bc8ca6fbcc289cdf5e0f07073f.tar.bz2 android-node-v8-094bfaf769f5b6bc8ca6fbcc289cdf5e0f07073f.zip |
test: replace assert.throws w/ common.expectsError
PR-URL: https://github.com/nodejs/node/pull/17557
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel/test-http2-client-request-options-errors.js')
-rw-r--r-- | test/parallel/test-http2-client-request-options-errors.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/parallel/test-http2-client-request-options-errors.js b/test/parallel/test-http2-client-request-options-errors.js index 5d3fc0ab5a..4b146a1bc8 100644 --- a/test/parallel/test-http2-client-request-options-errors.js +++ b/test/parallel/test-http2-client-request-options-errors.js @@ -3,7 +3,6 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); -const assert = require('assert'); const http2 = require('http2'); // Check if correct errors are emitted when wrong type of data is passed @@ -40,19 +39,19 @@ server.listen(0, common.mustCall(() => { return; } - assert.throws( + common.expectsError( () => client.request({ ':method': 'CONNECT', ':authority': `localhost:${port}` }, { [option]: types[type] }), - common.expectsError({ + { type: TypeError, code: 'ERR_INVALID_OPT_VALUE', message: `The value "${String(types[type])}" is invalid ` + `for option "${option}"` - }) + } ); }); }); |