Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
using strictEqual instead of equal.
  • Loading branch information
ftatieze committed Dec 1, 2016
commit 1f48698915eadd26105cfc1ca739da5c3937fe5b
10 changes: 5 additions & 5 deletions test/parallel/test-console-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
};

Expand All @@ -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;
};

Expand All @@ -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() {
Expand Down