Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 39a561b

Browse filesBrowse files
lshanmugcodebytere
authored andcommitted
test: change callback function to arrow function
PR-URL: #24421 Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent f4c2d9e commit 39a561b
Copy full SHA for 39a561b

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-stream-unshift-empty-chunk.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-unshift-empty-chunk.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ let nChunks = 10;
3232
const chunk = Buffer.alloc(10, 'x');
3333

3434
r._read = function(n) {
35-
setImmediate(function() {
35+
setImmediate(() => {
3636
r.push(--nChunks === 0 ? null : chunk);
3737
});
3838
};
3939

4040
let readAll = false;
4141
const seen = [];
42-
r.on('readable', function() {
42+
r.on('readable', () => {
4343
let chunk;
4444
while (chunk = r.read()) {
4545
seen.push(chunk.toString());
@@ -74,7 +74,7 @@ const expect =
7474
'xxxxxxxxxx',
7575
'yyyyy' ];
7676

77-
r.on('end', function() {
77+
r.on('end', () => {
7878
assert.deepStrictEqual(seen, expect);
7979
console.log('ok');
8080
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.