diff options
author | Mithun Sasidharan <mithunsasidharan89@gmail.com> | 2017-12-06 20:02:42 +0530 |
---|---|---|
committer | Anatoli Papirovski <apapirovski@mac.com> | 2017-12-08 13:34:54 -0500 |
commit | 20a8e83e44a6555a40c9d5f367a9a7be8fed0374 (patch) | |
tree | 9f85630e36dd769e46cf148ebc06697045362641 /test/parallel/test-dgram-setTTL.js | |
parent | f81bb7b527bb58ee68ddd26c9eee56a133547c01 (diff) | |
download | android-node-v8-20a8e83e44a6555a40c9d5f367a9a7be8fed0374.tar.gz android-node-v8-20a8e83e44a6555a40c9d5f367a9a7be8fed0374.tar.bz2 android-node-v8-20a8e83e44a6555a40c9d5f367a9a7be8fed0374.zip |
test: replace assert.throws w/ common.expectsError
PR-URL: https://github.com/nodejs/node/pull/17494
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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-dgram-setTTL.js')
-rw-r--r-- | test/parallel/test-dgram-setTTL.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-dgram-setTTL.js b/test/parallel/test-dgram-setTTL.js index 840a3f4d09..c6e8cb3c66 100644 --- a/test/parallel/test-dgram-setTTL.js +++ b/test/parallel/test-dgram-setTTL.js @@ -9,13 +9,13 @@ socket.on('listening', common.mustCall(() => { const result = socket.setTTL(16); assert.strictEqual(result, 16); - assert.throws(() => { + common.expectsError(() => { socket.setTTL('foo'); - }, common.expectsError({ + }, { code: 'ERR_INVALID_ARG_TYPE', type: TypeError, message: 'The "ttl" argument must be of type number. Received type string' - })); + }); // TTL must be a number from > 0 to < 256 assert.throws(() => { |