Skip to content

Commit

Permalink
test: remove string literal from strictEqual
Browse files Browse the repository at this point in the history
Remove obsolete string literals from `assert.strictEqual()` calls in
test/parallel/test-stream-pip-await-drain-push-while-write.js.

PR-URL: #20920
Refs: https://www.nodetodo.org/getting-started
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
AbhimanyuVashisht authored and targos committed May 25, 2018
1 parent 87ad931 commit 40e5788
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@ const writable = new stream.Writable({
write: common.mustCall(function(chunk, encoding, cb) {
assert.strictEqual(
readable._readableState.awaitDrain,
0,
'State variable awaitDrain is not correct.'
0
);

if (chunk.length === 32 * 1024) { // first chunk
readable.push(Buffer.alloc(34 * 1024)); // above hwm
// We should check if awaitDrain counter is increased in the next
// tick, because awaitDrain is incremented after this method finished
process.nextTick(() => {
assert.strictEqual(readable._readableState.awaitDrain, 1,
'Counter is not increased for awaitDrain');
assert.strictEqual(readable._readableState.awaitDrain, 1);
});
}

Expand Down

0 comments on commit 40e5788

Please sign in to comment.