summaryrefslogtreecommitdiff
path: root/test/pummel/test-net-pingpong-delay.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/pummel/test-net-pingpong-delay.js')
-rw-r--r--test/pummel/test-net-pingpong-delay.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/pummel/test-net-pingpong-delay.js b/test/pummel/test-net-pingpong-delay.js
index 9a598435d1..2236ba83a8 100644
--- a/test/pummel/test-net-pingpong-delay.js
+++ b/test/pummel/test-net-pingpong-delay.js
@@ -14,30 +14,30 @@ function pingPongTest(port, host, on_complete) {
socket.on('data', function(data) {
console.log(data);
- assert.equal('PING', data);
- assert.equal('open', socket.readyState);
- assert.equal(true, count <= N);
+ assert.strictEqual('PING', data);
+ assert.strictEqual('open', socket.readyState);
+ assert.strictEqual(true, count <= N);
setTimeout(function() {
- assert.equal('open', socket.readyState);
+ assert.strictEqual('open', socket.readyState);
socket.write('PONG');
}, DELAY);
});
socket.on('timeout', function() {
console.error('server-side timeout!!');
- assert.equal(false, true);
+ assert.strictEqual(false, true);
});
socket.on('end', function() {
console.log('server-side socket EOF');
- assert.equal('writeOnly', socket.readyState);
+ assert.strictEqual('writeOnly', socket.readyState);
socket.end();
});
socket.on('close', function(had_error) {
console.log('server-side socket.end');
- assert.equal(false, had_error);
- assert.equal('closed', socket.readyState);
+ assert.strictEqual(false, had_error);
+ assert.strictEqual('closed', socket.readyState);
socket.server.close();
});
});
@@ -48,17 +48,17 @@ function pingPongTest(port, host, on_complete) {
client.setEncoding('utf8');
client.on('connect', function() {
- assert.equal('open', client.readyState);
+ assert.strictEqual('open', client.readyState);
client.write('PING');
});
client.on('data', function(data) {
console.log(data);
- assert.equal('PONG', data);
- assert.equal('open', client.readyState);
+ assert.strictEqual('PONG', data);
+ assert.strictEqual('open', client.readyState);
setTimeout(function() {
- assert.equal('open', client.readyState);
+ assert.strictEqual('open', client.readyState);
if (count++ < N) {
client.write('PING');
} else {
@@ -71,12 +71,12 @@ function pingPongTest(port, host, on_complete) {
client.on('timeout', function() {
console.error('client-side timeout!!');
- assert.equal(false, true);
+ assert.strictEqual(false, true);
});
client.on('close', common.mustCall(function() {
console.log('client.end');
- assert.equal(N + 1, count);
+ assert.strictEqual(N + 1, count);
assert.ok(client_ended);
if (on_complete) on_complete();
}));