Permalink
Browse files

test: remove string literal from strictEqual()

Remove 3rd argument from assert.deepStrictEqual() in
test/parallel/test-stream2-writable.js to allow for debugging to work
properly.

PR-URL: #22512
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
  • Loading branch information...
ScottyVG authored and gdams committed Aug 24, 2018
1 parent dd03706 commit 31b3273eaa02ee12188a4c7a64a0d4adfbe22670
Showing with 14 additions and 8 deletions.
  1. +14 −8 test/parallel/test-stream2-writable.js
@@ -55,7 +55,8 @@ for (let i = 0; i < chunks.length; i++) {
});
tw.on('finish', common.mustCall(function() {
assert.deepStrictEqual(tw.buffer, chunks, 'got chunks in the right order');
// got chunks in the right order
assert.deepStrictEqual(tw.buffer, chunks);
}));
chunks.forEach(function(chunk) {
@@ -72,7 +73,8 @@ for (let i = 0; i < chunks.length; i++) {
});
tw.on('finish', common.mustCall(function() {
assert.deepStrictEqual(tw.buffer, chunks, 'got chunks in the right order');
// got chunks in the right order
assert.deepStrictEqual(tw.buffer, chunks);
}));
let i = 0;
@@ -94,7 +96,8 @@ for (let i = 0; i < chunks.length; i++) {
let drains = 0;
tw.on('finish', common.mustCall(function() {
assert.deepStrictEqual(tw.buffer, chunks, 'got chunks in the right order');
// got chunks in the right order
assert.deepStrictEqual(tw.buffer, chunks);
assert.strictEqual(drains, 17);
}));
@@ -139,7 +142,8 @@ for (let i = 0; i < chunks.length; i++) {
undefined ];
tw.on('finish', function() {
assert.deepStrictEqual(tw.buffer, chunks, 'got the expected chunks');
// got the expected chunks
assert.deepStrictEqual(tw.buffer, chunks);
});
chunks.forEach(function(chunk, i) {
@@ -177,7 +181,8 @@ for (let i = 0; i < chunks.length; i++) {
undefined ];
tw.on('finish', function() {
assert.deepStrictEqual(tw.buffer, chunks, 'got the expected chunks');
// got the expected chunks
assert.deepStrictEqual(tw.buffer, chunks);
});
chunks.forEach(function(chunk, i) {
@@ -205,9 +210,10 @@ for (let i = 0; i < chunks.length; i++) {
tw.on('finish', common.mustCall(function() {
process.nextTick(common.mustCall(function() {
assert.deepStrictEqual(tw.buffer, chunks,
'got chunks in the right order');
assert.deepStrictEqual(callbacks._called, chunks, 'called all callbacks');
// got chunks in the right order
assert.deepStrictEqual(tw.buffer, chunks);
// called all callbacks
assert.deepStrictEqual(callbacks._called, chunks);
}));
}));

0 comments on commit 31b3273

Please sign in to comment.