Skip to content
Closed

Jsarrow7 #24441

Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion test/parallel/test-buffer-alloc.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ assert.strictEqual((Buffer.from('Man')).toString('base64'), 'TWFu');
'dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZ' +
'GdlLCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm' +
'5hbCBwbGVhc3VyZS4=';
assert.strictEqual(expected, (Buffer.from(quote)).toString('base64'));
assert.strictEqual((Buffer.from(quote)).toString('base64'), expected);

let b = Buffer.allocUnsafe(1024);
let bytesWritten = b.write(expected, 0, 'base64');
Expand Down
8 changes: 4 additions & 4 deletions test/parallel/test-stream-pipe-await-drain.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ writer1._write = common.mustCall(function(chunk, encoding, cb) {
cb();
}, 1);

writer1.once('chunk-received', function() {
writer1.once('chunk-received', () => {
assert.strictEqual(
reader._readableState.awaitDrain,
0,
'awaitDrain initial value should be 0, actual is ' +
reader._readableState.awaitDrain
);
setImmediate(function() {
setImmediate(() => {
// This one should *not* get through to writer1 because writer2 is not
// "done" processing.
reader.push(buffer);
});
});

// A "slow" consumer:
writer2._write = common.mustCall(function(chunk, encoding, cb) {
writer2._write = common.mustCall((chunk, encoding, cb) => {
assert.strictEqual(
reader._readableState.awaitDrain,
1,
Expand All @@ -49,7 +49,7 @@ writer2._write = common.mustCall(function(chunk, encoding, cb) {
// will return false.
}, 1);

writer3._write = common.mustCall(function(chunk, encoding, cb) {
writer3._write = common.mustCall((chunk, encoding, cb) => {
assert.strictEqual(
reader._readableState.awaitDrain,
2,
Expand Down