From 36696cfe8479f3fd511124b60c24b4a6a33a80da Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 19 Aug 2018 16:56:11 -0700 Subject: [PATCH] test: improve assert message in http timeout test PR-URL: https://github.com/nodejs/node/pull/22403 Reviewed-By: Ruben Bridgewater Reviewed-By: Refael Ackermann Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca --- test/parallel/test-http-client-timeout-option-with-agent.js | 6 ++++-- 1 file 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 63f683975dc9d0..26c93ec55bc903 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();