Skip to content

Commit

Permalink
test: change the repeat Buffer.from('blerg'); statments
Browse files Browse the repository at this point in the history
PR-URL: #28372
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
themiken authored and targos committed Jul 20, 2019
1 parent 5980373 commit 4c333f4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/parallel/test-stream-writable-constructor-set-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ w.on('error', common.expectsError({
message: 'The _write() method is not implemented'
}));

w.end(Buffer.from('blerg'));
const bufferBlerg = Buffer.from('blerg');

w.end(bufferBlerg);

const _write = common.mustCall((chunk, _, next) => {
next();
Expand All @@ -28,10 +30,10 @@ const w2 = new Writable({ write: _write, writev: _writev });
strictEqual(w2._write, _write);
strictEqual(w2._writev, _writev);

w2.write(Buffer.from('blerg'));
w2.write(bufferBlerg);

w2.cork();
w2.write(Buffer.from('blerg'));
w2.write(Buffer.from('blerg'));
w2.write(bufferBlerg);
w2.write(bufferBlerg);

w2.end();

0 comments on commit 4c333f4

Please sign in to comment.