Commit a27df5d
test: replace function with arrow function
1. Among the list of Code and Learn,
I solved the unfinished task of replacing function with arrow function:
nodejs/code-and-learn#72 (comment)
2. Replace arrow function with shorter property syntax
Arrow function makes `this` lexical scope.
But toString expects evaluate `this` in runtime.
3. Replace this with null
makeBlock does not need `this`.
update `this` with `null` to clarify the intent.
PR-URL: #17345
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>1 parent a6c7030 commit a27df5dCopy full SHA for a27df5d
File tree
Expand file treeCollapse file tree
5 files changed
+40
-40
lines changedOpen diff view settings
Filter options
- test/parallel
Expand file treeCollapse file tree
5 files changed
+40
-40
lines changedOpen diff view settings
Collapse file
test/parallel/test-assert.js
Copy file name to clipboardExpand all lines: test/parallel/test-assert.js+9-9Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
26 | 26 | |
27 | 27 | |
28 | 28 | |
29 | | - |
30 | | - |
| 29 | + |
| 30 | + |
31 | 31 | |
32 | 32 | |
33 | 33 | |
| ||
183 | 183 | |
184 | 184 | |
185 | 185 | |
186 | | - |
| 186 | + |
187 | 187 | |
188 | 188 | |
189 | 189 | |
| ||
458 | 458 | |
459 | 459 | |
460 | 460 | |
461 | | - |
| 461 | + |
462 | 462 | |
463 | | - |
464 | | - |
| 463 | + |
| 464 | + |
465 | 465 | |
466 | 466 | |
467 | 467 | |
| ||
473 | 473 | |
474 | 474 | |
475 | 475 | |
476 | | - |
| 476 | + |
477 | 477 | |
478 | 478 | |
479 | 479 | |
| ||
488 | 488 | |
489 | 489 | |
490 | 490 | |
491 | | - |
| 491 | + |
492 | 492 | |
493 | 493 | |
494 | 494 | |
| ||
591 | 591 | |
592 | 592 | |
593 | 593 | |
594 | | - |
| 594 | + |
595 | 595 | |
596 | 596 | |
597 | 597 | |
|
Collapse file
test/parallel/test-domain-top-level-error-handler-clears-stack.js
Copy file name to clipboardExpand all lines: test/parallel/test-domain-top-level-error-handler-clears-stack.js+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | | - |
13 | | - |
| 12 | + |
| 13 | + |
14 | 14 | |
15 | 15 | |
16 | 16 | |
| ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
32 | | - |
| 32 | + |
33 | 33 | |
34 | 34 | |
Collapse file
test/parallel/test-querystring.js
Copy file name to clipboardExpand all lines: test/parallel/test-querystring.js+12-12Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
129 | 129 | |
130 | 130 | |
131 | 131 | |
132 | | - |
| 132 | + |
133 | 133 | |
134 | 134 | |
135 | 135 | |
| ||
189 | 189 | |
190 | 190 | |
191 | 191 | |
192 | | - |
| 192 | + |
193 | 193 | |
194 | 194 | |
195 | 195 | |
| ||
203 | 203 | |
204 | 204 | |
205 | 205 | |
206 | | - |
| 206 | + |
207 | 207 | |
208 | 208 | |
209 | 209 | |
210 | 210 | |
211 | | - |
| 211 | + |
212 | 212 | |
213 | 213 | |
214 | 214 | |
215 | 215 | |
216 | | - |
| 216 | + |
217 | 217 | |
218 | 218 | |
219 | 219 | |
220 | | - |
| 220 | + |
221 | 221 | |
222 | 222 | |
223 | 223 | |
| ||
255 | 255 | |
256 | 256 | |
257 | 257 | |
258 | | - |
| 258 | + |
259 | 259 | |
260 | 260 | |
261 | 261 | |
262 | | - |
| 262 | + |
263 | 263 | |
264 | 264 | |
265 | 265 | |
266 | | - |
| 266 | + |
267 | 267 | |
268 | 268 | |
269 | 269 | |
| ||
292 | 292 | |
293 | 293 | |
294 | 294 | |
295 | | - |
| 295 | + |
296 | 296 | |
297 | 297 | |
298 | 298 | |
| ||
423 | 423 | |
424 | 424 | |
425 | 425 | |
426 | | - |
| 426 | + |
427 | 427 | |
428 | 428 | |
429 | 429 | |
430 | 430 | |
431 | 431 | |
432 | 432 | |
433 | 433 | |
434 | | - |
| 434 | + |
435 | 435 | |
436 | 436 | |
437 | 437 | |
|
Collapse file
test/parallel/test-writeint.js
Copy file name to clipboardExpand all lines: test/parallel/test-writeint.js+12-12Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
37 | 37 | |
38 | 38 | |
39 | 39 | |
40 | | - |
| 40 | + |
41 | 41 | |
42 | 42 | |
43 | | - |
| 43 | + |
44 | 44 | |
45 | 45 | |
46 | 46 | |
| ||
50 | 50 | |
51 | 51 | |
52 | 52 | |
53 | | - |
| 53 | + |
54 | 54 | |
55 | 55 | |
56 | | - |
| 56 | + |
57 | 57 | |
58 | 58 | |
59 | 59 | |
| ||
90 | 90 | |
91 | 91 | |
92 | 92 | |
93 | | - |
| 93 | + |
94 | 94 | |
95 | 95 | |
96 | | - |
| 96 | + |
97 | 97 | |
98 | 98 | |
99 | 99 | |
| ||
103 | 103 | |
104 | 104 | |
105 | 105 | |
106 | | - |
| 106 | + |
107 | 107 | |
108 | 108 | |
109 | | - |
| 109 | + |
110 | 110 | |
111 | 111 | |
112 | 112 | |
| ||
159 | 159 | |
160 | 160 | |
161 | 161 | |
162 | | - |
| 162 | + |
163 | 163 | |
164 | 164 | |
165 | | - |
| 165 | + |
166 | 166 | |
167 | 167 | |
168 | 168 | |
| ||
176 | 176 | |
177 | 177 | |
178 | 178 | |
179 | | - |
| 179 | + |
180 | 180 | |
181 | 181 | |
182 | | - |
| 182 | + |
183 | 183 | |
184 | 184 | |
185 | 185 | |
|
Collapse file
test/parallel/test-zerolengthbufferbug.js
Copy file name to clipboardExpand all lines: test/parallel/test-zerolengthbufferbug.js+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
| 7 | + |
8 | 8 | |
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | | - |
16 | | - |
| 15 | + |
| 16 | + |
17 | 17 | |
18 | 18 | |
19 | 19 | |
20 | | - |
| 20 | + |
21 | 21 | |
22 | 22 | |
23 | 23 | |
|
0 commit comments