Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: improve test-stream2-objects.js. #9565

Closed
Closed
Changes from all commits
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
18 changes: 9 additions & 9 deletions test/parallel/test-stream2-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function run() {

// ensure all tests have run
process.on('exit', function() {
assert.equal(count, 0);
assert.strictEqual(count, 0);
});

process.nextTick(run);
Expand Down Expand Up @@ -210,16 +210,16 @@ test('high watermark _read', function(t) {

var v = r.read();

assert.equal(calls, 0);
assert.equal(v, '1');
assert.strictEqual(calls, 0);
assert.strictEqual(v, '1');

var v2 = r.read();
assert.equal(v2, '2');
assert.strictEqual(v2, '2');

var v3 = r.read();
assert.equal(v3, '3');
assert.strictEqual(v3, '3');

assert.equal(calls, 1);
assert.strictEqual(calls, 1);

t.end();
});
Expand All @@ -232,7 +232,7 @@ test('high watermark push', function(t) {
r._read = function(n) {};
for (var i = 0; i < 6; i++) {
var bool = r.push(i);
assert.equal(bool, i === 5 ? false : true);
assert.strictEqual(bool, i !== 5);
}

t.end();
Expand Down Expand Up @@ -309,7 +309,7 @@ test('buffers finish until cb is called', function(t) {
var called = false;

w._write = function(chunk, encoding, cb) {
assert.equal(chunk, 'foo');
assert.strictEqual(chunk, 'foo');

process.nextTick(function() {
called = true;
Expand All @@ -318,7 +318,7 @@ test('buffers finish until cb is called', function(t) {
};

w.on('finish', function() {
assert.equal(called, true);
assert.strictEqual(called, true);

t.end();
});
Expand Down