diff options
author | Weijia Wang <381152119@qq.com> | 2017-07-22 19:23:04 +0800 |
---|---|---|
committer | Tobias Nießen <tniessen@tnie.de> | 2017-08-01 14:08:12 +0200 |
commit | bdfbce924159ece4b32ee7f774a263987e719972 (patch) | |
tree | 2134a4937c1d751de771abe92d00c8cf47fc2307 /test/parallel/test-http-client-reject-unexpected-agent.js | |
parent | 8db39971b768118ce2c0c34d88788daea14f52c9 (diff) | |
download | node-new-bdfbce924159ece4b32ee7f774a263987e719972.tar.gz |
http_client, errors: migrate to internal/errors
PR-URL: https://github.com/nodejs/node/pull/14423
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'test/parallel/test-http-client-reject-unexpected-agent.js')
-rw-r--r-- | test/parallel/test-http-client-reject-unexpected-agent.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/parallel/test-http-client-reject-unexpected-agent.js b/test/parallel/test-http-client-reject-unexpected-agent.js index f1798b483f..23439baa32 100644 --- a/test/parallel/test-http-client-reject-unexpected-agent.js +++ b/test/parallel/test-http-client-reject-unexpected-agent.js @@ -49,8 +49,12 @@ server.listen(0, baseOptions.host, common.mustCall(function() { failingAgentOptions.forEach((agent) => { assert.throws( () => createRequest(agent), - /^TypeError: Agent option must be an Agent-like object/, - `Expected typeof agent: ${typeof agent} to be rejected` + 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' + }) ); }); |