diff options
author | Fabrice Tatieze <fabrice.tatieze@nike.com> | 2016-12-01 10:21:41 -0600 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-12-05 19:46:30 -0800 |
commit | f6d15b033bc5db91696e493d7d57e29f376c7d68 (patch) | |
tree | 7bfa187e66b398ec2a1bd3fa2766cc9f1b2173a8 /test/parallel/test-console-instance.js | |
parent | 6ed0e8b49c842a25f64b5c003c51a21b51f38c65 (diff) | |
download | node-new-f6d15b033bc5db91696e493d7d57e29f376c7d68.tar.gz |
test: using const and strictEqual
PR-URL: https://github.com/nodejs/node/pull/9926
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-console-instance.js')
-rw-r--r-- | test/parallel/test-console-instance.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-console-instance.js b/test/parallel/test-console-instance.js index b8d9880865..4d2727d96b 100644 --- a/test/parallel/test-console-instance.js +++ b/test/parallel/test-console-instance.js @@ -15,7 +15,7 @@ process.stdout.write = process.stderr.write = function() { }; // make sure that the "Console" function exists -assert.equal('function', typeof Console); +assert.strictEqual('function', typeof Console); // make sure that the Console constructor throws // when not given a writable stream instance @@ -35,7 +35,7 @@ out.write = err.write = function(d) {}; var c = new Console(out, err); out.write = err.write = function(d) { - assert.equal(d, 'test\n'); + assert.strictEqual(d, 'test\n'); called = true; }; @@ -48,7 +48,7 @@ c.error('test'); assert(called); out.write = function(d) { - assert.equal('{ foo: 1 }\n', d); + assert.strictEqual('{ foo: 1 }\n', d); called = true; }; @@ -60,10 +60,10 @@ assert(called); called = 0; out.write = function(d) { called++; - assert.equal(d, called + ' ' + (called - 1) + ' [ 1, 2, 3 ]\n'); + assert.strictEqual(d, called + ' ' + (called - 1) + ' [ 1, 2, 3 ]\n'); }; [1, 2, 3].forEach(c.log); -assert.equal(3, called); +assert.strictEqual(3, called); // Console() detects if it is called without `new` keyword assert.doesNotThrow(function() { |