Skip to content

Commit d194aae

Browse files
committed
test: improve assert message in http timeout test
1 parent 0cd6873 commit d194aae

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

Lines changed: 4 additions & 2 deletions
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)