test: replace anonymous closure with arrow func
PR-URL: https://github.com/nodejs/node/pull/24480 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
9d34a1e3c0
commit
0fad875b37
@ -51,13 +51,13 @@ const src2 = new TestReader();
|
||||
|
||||
src1.pipe(dest);
|
||||
|
||||
src1.once('readable', function() {
|
||||
process.nextTick(function() {
|
||||
src1.once('readable', () => {
|
||||
process.nextTick(() => {
|
||||
|
||||
src2.pipe(dest);
|
||||
|
||||
src2.once('readable', function() {
|
||||
process.nextTick(function() {
|
||||
src2.once('readable', () => {
|
||||
process.nextTick(() => {
|
||||
|
||||
src1.unpipe(dest);
|
||||
});
|
||||
@ -66,7 +66,7 @@ src1.once('readable', function() {
|
||||
});
|
||||
|
||||
|
||||
process.on('exit', function() {
|
||||
process.on('exit', () => {
|
||||
assert.strictEqual(src1.reads, 2);
|
||||
assert.strictEqual(src2.reads, 2);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user