summaryrefslogtreecommitdiff
path: root/test/pummel
diff options
context:
space:
mode:
authorsreepurnajasti <sreepurna.jasti@gmail.com>2018-01-10 15:05:15 +0530
committerJoyee Cheung <joyeec9h3@gmail.com>2018-01-17 08:50:02 +0800
commite08cf1d2309fb4368f11277e7021fa6d63790b9d (patch)
tree228906a7a5cc97cb1a810d8de4e4eefc8531a64e /test/pummel
parentd3600e513ae277534e9a37b51489ec8584fbf3dc (diff)
downloadandroid-node-v8-e08cf1d2309fb4368f11277e7021fa6d63790b9d.tar.gz
android-node-v8-e08cf1d2309fb4368f11277e7021fa6d63790b9d.tar.bz2
android-node-v8-e08cf1d2309fb4368f11277e7021fa6d63790b9d.zip
test: improve to use template string
PR-URL: https://github.com/nodejs/node/pull/18097 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'test/pummel')
-rw-r--r--test/pummel/test-exec.js6
-rw-r--r--test/pummel/test-net-write-callbacks.js2
-rw-r--r--test/pummel/test-regress-GH-892.js4
-rw-r--r--test/pummel/test-tls-throttle.js4
-rw-r--r--test/pummel/test-vm-memleak.js2
5 files changed, 9 insertions, 9 deletions
diff --git a/test/pummel/test-exec.js b/test/pummel/test-exec.js
index e6e88f53e1..92b5cb64ec 100644
--- a/test/pummel/test-exec.js
+++ b/test/pummel/test-exec.js
@@ -79,7 +79,7 @@ exec('thisisnotavalidcommand', function(err, stdout, stderr) {
const sleeperStart = new Date();
exec(SLEEP3_COMMAND, { timeout: 50 }, function(err, stdout, stderr) {
const diff = (new Date()) - sleeperStart;
- console.log('\'sleep 3\' with timeout 50 took %d ms', diff);
+ console.log(`'sleep 3' with timeout 50 took ${diff} ms`);
assert.ok(diff < 500);
assert.ok(err);
assert.ok(err.killed);
@@ -94,7 +94,7 @@ const killMeTwice = exec(SLEEP3_COMMAND, { timeout: 1000 },
killMeTwiceCallback);
process.nextTick(function() {
- console.log('kill pid %d', killMeTwice.pid);
+ console.log(`kill pid ${killMeTwice.pid}`);
// make sure there is no race condition in starting the process
// the PID SHOULD exist directly following the exec() call.
assert.strictEqual('number', typeof killMeTwice._handle.pid);
@@ -113,7 +113,7 @@ function killMeTwiceCallback(err, stdout, stderr) {
assert.strictEqual(stderr, '');
// the timeout should still be in effect
- console.log('\'sleep 3\' was already killed. Took %d ms', diff);
+ console.log(`'sleep 3' was already killed. Took ${diff} ms`);
assert.ok(diff < 1500);
}
diff --git a/test/pummel/test-net-write-callbacks.js b/test/pummel/test-net-write-callbacks.js
index 10aff09058..a4a6096d63 100644
--- a/test/pummel/test-net-write-callbacks.js
+++ b/test/pummel/test-net-write-callbacks.js
@@ -29,7 +29,7 @@ const N = 500000;
const server = net.Server(function(socket) {
socket.on('data', function(d) {
- console.error('got %d bytes', d.length);
+ console.error(`got ${d.length} bytes`);
});
socket.on('end', function() {
diff --git a/test/pummel/test-regress-GH-892.js b/test/pummel/test-regress-GH-892.js
index 05e27628b1..4021a53736 100644
--- a/test/pummel/test-regress-GH-892.js
+++ b/test/pummel/test-regress-GH-892.js
@@ -102,11 +102,11 @@ const server = https.Server(serverOptions, function(req, res) {
});
server.listen(common.PORT, function() {
- console.log('expecting %d bytes', bytesExpected);
+ console.log(`expecting ${bytesExpected} bytes`);
makeRequest();
});
process.on('exit', function() {
- console.error('got %d bytes', uploadCount);
+ console.error(`got ${uploadCount} bytes`);
assert.strictEqual(uploadCount, bytesExpected);
});
diff --git a/test/pummel/test-tls-throttle.js b/test/pummel/test-tls-throttle.js
index 3e18c4cff4..af588dfa91 100644
--- a/test/pummel/test-tls-throttle.js
+++ b/test/pummel/test-tls-throttle.js
@@ -72,8 +72,8 @@ server.listen(common.PORT, function() {
function displayCounts() {
- console.log('body.length: %d', body.length);
- console.log(' recvCount: %d', recvCount);
+ console.log(`body.length: ${body.length}`);
+ console.log(` recvCount: ${recvCount}`);
}
diff --git a/test/pummel/test-vm-memleak.js b/test/pummel/test-vm-memleak.js
index 601781fec2..cb96512d38 100644
--- a/test/pummel/test-vm-memleak.js
+++ b/test/pummel/test-vm-memleak.js
@@ -57,6 +57,6 @@ function testContextLeak() {
}
process.on('exit', function() {
- console.error('max mem: %dmb', Math.round(maxMem / (1024 * 1024)));
+ console.error(`max mem: ${Math.round(maxMem / (1024 * 1024))}mb`);
assert.ok(maxMem < 64 * 1024 * 1024);
});