GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: use arrow functions in callbacks · nodejs/node@9d54555

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-stream-pipe-await-drain.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-stream-pipe-await-drain.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-pipe-await-drain.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ writer1._write = common.mustCall(function(chunk, encoding, cb) {
2222
cb();
2323
}, 1);
2424

25-
writer1.once('chunk-received', function() {
25+
writer1.once('chunk-received', () => {
2626
assert.strictEqual(
2727
reader._readableState.awaitDrain,
2828
0,
2929
'awaitDrain initial value should be 0, actual is ' +
3030
reader._readableState.awaitDrain
3131
);
32-
setImmediate(function() {
32+
setImmediate(() => {
3333
// This one should *not* get through to writer1 because writer2 is not
3434
// "done" processing.
3535
reader.push(buffer);
3636
});
3737
});
3838

3939
// A "slow" consumer:
40-
writer2._write = common.mustCall(function(chunk, encoding, cb) {
40+
writer2._write = common.mustCall((chunk, encoding, cb) => {
4141
assert.strictEqual(
4242
reader._readableState.awaitDrain,
4343
1,
@@ -49,7 +49,7 @@ writer2._write = common.mustCall(function(chunk, encoding, cb) {
4949
// will return false.
5050
}, 1);
5151

52-
writer3._write = common.mustCall(function(chunk, encoding, cb) {
52+
writer3._write = common.mustCall((chunk, encoding, cb) => {
5353
assert.strictEqual(
5454
reader._readableState.awaitDrain,
5555
2,

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.