Skip to content

Commit e8e014a

Browse files
Trotttargos
authored andcommitted
test: improve assert message in http timeout test
PR-URL: #22403 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 22adebf commit e8e014a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/parallel/test-http-client-timeout-option-with-agent.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ function doRequest() {
4343
const duration = Date.now() - start;
4444
// The timeout event cannot be precisely timed. It will delay
4545
// some number of milliseconds.
46-
assert.ok(duration >= HTTP_CLIENT_TIMEOUT,
47-
`${duration} < ${HTTP_CLIENT_TIMEOUT}`);
46+
assert.ok(
47+
duration >= HTTP_CLIENT_TIMEOUT,
48+
`duration ${duration}ms less than timeout ${HTTP_CLIENT_TIMEOUT}ms`
49+
);
4850
}));
4951
req.end();
5052

0 commit comments

Comments
 (0)