summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-client-reject-unexpected-agent.js
diff options
context:
space:
mode:
authorMithun Sasidharan <mithunsasidharan89@gmail.com>2017-12-06 21:08:06 +0530
committerAnatoli Papirovski <apapirovski@mac.com>2017-12-08 13:37:33 -0500
commitacd427713422138a92f74a4c3c2a1f6d8ecf9778 (patch)
tree005ed9f2b3382df5bc2cb4e4e4af6164815c4c4d /test/parallel/test-http-client-reject-unexpected-agent.js
parent20a8e83e44a6555a40c9d5f367a9a7be8fed0374 (diff)
downloadandroid-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-client-reject-unexpected-agent.js')
-rw-r--r--test/parallel/test-http-client-reject-unexpected-agent.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-http-client-reject-unexpected-agent.js b/test/parallel/test-http-client-reject-unexpected-agent.js
index 50d80fd32a..407084c030 100644
--- a/test/parallel/test-http-client-reject-unexpected-agent.js
+++ b/test/parallel/test-http-client-reject-unexpected-agent.js
@@ -47,14 +47,14 @@ server.listen(0, baseOptions.host, common.mustCall(function() {
baseOptions.port = this.address().port;
failingAgentOptions.forEach((agent) => {
- assert.throws(
+ common.expectsError(
() => createRequest(agent),
- common.expectsError({
+ {
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: 'The "Agent option" argument must be one of type ' +
'Agent-like Object, undefined, or false'
- })
+ }
);
});