Permalink
Browse files

test: remove string literal from strictEqual

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 BridgeAR committed May 24, 2018
1 parent cf989b6 commit 4970cd678e524981b6b3ecf5d23bc11c5403f645
Showing with 2 additions and 4 deletions.
  1. +2 −4 test/parallel/test-stream-pipe-await-drain-push-while-write.js
@@ -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);
});
}

0 comments on commit 4970cd6

Please sign in to comment.