summaryrefslogtreecommitdiff
path: root/test/parallel/test-net-connect-options-port.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-net-connect-options-port.js')
-rw-r--r--test/parallel/test-net-connect-options-port.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-net-connect-options-port.js b/test/parallel/test-net-connect-options-port.js
index 73a719c7bd..b3c370c8d9 100644
--- a/test/parallel/test-net-connect-options-port.js
+++ b/test/parallel/test-net-connect-options-port.js
@@ -88,8 +88,8 @@ const net = require('net');
// Total connections = 3 * 4(canConnect) * 6(doConnect) = 72
canConnect(port);
- canConnect(port + '');
- canConnect('0x' + port.toString(16));
+ canConnect(String(port));
+ canConnect(`0x${port.toString(16)}`);
}));
// Try connecting to random ports, but do so once the server is closed
@@ -191,7 +191,7 @@ function canConnect(port) {
function asyncFailToConnect(port) {
const onError = () => common.mustCall(function(err) {
const regexp = /^Error: connect (E\w+)(.+)$/;
- assert(regexp.test(err + ''), err + '');
+ assert(regexp.test(String(err)), String(err));
});
const dont = () => common.mustNotCall();