diff options
author | Rich Trott <rtrott@gmail.com> | 2018-08-19 16:56:11 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-08-20 18:59:12 -0700 |
commit | 36696cfe8479f3fd511124b60c24b4a6a33a80da (patch) | |
tree | 412d5254baeee6f004dd43ff6e522c9984baef8b /test/parallel/test-http-client-timeout-option-with-agent.js | |
parent | 4b71b01339a968c9e5a1d3750da46fa1d70fe03c (diff) | |
download | android-node-v8-36696cfe8479f3fd511124b60c24b4a6a33a80da.tar.gz android-node-v8-36696cfe8479f3fd511124b60c24b4a6a33a80da.tar.bz2 android-node-v8-36696cfe8479f3fd511124b60c24b4a6a33a80da.zip |
test: improve assert message in http timeout test
PR-URL: https://github.com/nodejs/node/pull/22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-http-client-timeout-option-with-agent.js')
-rw-r--r-- | test/parallel/test-http-client-timeout-option-with-agent.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/parallel/test-http-client-timeout-option-with-agent.js b/test/parallel/test-http-client-timeout-option-with-agent.js index 63f683975d..26c93ec55b 100644 --- a/test/parallel/test-http-client-timeout-option-with-agent.js +++ b/test/parallel/test-http-client-timeout-option-with-agent.js @@ -43,8 +43,10 @@ function doRequest() { const duration = Date.now() - start; // The timeout event cannot be precisely timed. It will delay // some number of milliseconds. - assert.ok(duration >= HTTP_CLIENT_TIMEOUT, - `${duration} < ${HTTP_CLIENT_TIMEOUT}`); + assert.ok( + duration >= HTTP_CLIENT_TIMEOUT, + `duration ${duration}ms less than timeout ${HTTP_CLIENT_TIMEOUT}ms` + ); })); req.end(); |