Commit 5bc130b
test: increase coverage for events
1. test EventEmitter.setMaxListeners with invalid listener count
https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/events.js.html#L171
2. test EventEmitter.setMaxListeners with invalid emitter
https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/events.js.html#L186
3. test getEventListeners with invalid emiiter
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/events.js.html#L706
4. test events.once with options: null
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/events.js.html#L712
5. add test case for inspect new Event()
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/event_target.js.html#L111
6. add test case for insepct new EventTarget()
Refs: https://coverage.nodejs.org/coverage-0b6d3070a176d437/lib/internal/event_target.js.html#L446
7. add test case for Event and EventTarget constructor name
PR-URL: #36668
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent b764269 commit 5bc130bCopy full SHA for 5bc130b
File tree
Expand file treeCollapse file tree
4 files changed
+64
-1
lines changedOpen diff view settings
Filter options
- test/parallel
Expand file treeCollapse file tree
4 files changed
+64
-1
lines changedOpen diff view settings
Collapse file
test/parallel/test-event-emitter-max-listeners.js
Copy file name to clipboardExpand all lines: test/parallel/test-event-emitter-max-listeners.js+14Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
56 | 56 | |
57 | 57 | |
58 | 58 | |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
Collapse file
test/parallel/test-events-once.js
Copy file name to clipboardExpand all lines: test/parallel/test-events-once.js+13Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
23 | 23 | |
24 | 24 | |
25 | 25 | |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
26 | 38 | |
27 | 39 | |
28 | 40 | |
| ||
195 | 207 | |
196 | 208 | |
197 | 209 | |
| 210 | + |
198 | 211 | |
199 | 212 | |
200 | 213 | |
|
Collapse file
test/parallel/test-events-static-geteventlisteners.js
Copy file name to clipboardExpand all lines: test/parallel/test-events-static-geteventlisteners.js+7Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
| 7 | + |
7 | 8 | |
8 | 9 | |
9 | 10 | |
| ||
34 | 35 | |
35 | 36 | |
36 | 37 | |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
Collapse file
test/parallel/test-eventtarget.js
Copy file name to clipboardExpand all lines: test/parallel/test-eventtarget.js+30-1Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | | - |
| 16 | + |
17 | 17 | |
18 | 18 | |
19 | 19 | |
| ||
541 | 541 | |
542 | 542 | |
543 | 543 | |
| 544 | + |
| 545 | + |
| 546 | + |
| 547 | + |
| 548 | + |
| 549 | + |
| 550 | + |
| 551 | + |
| 552 | + |
| 553 | + |
| 554 | + |
| 555 | + |
| 556 | + |
| 557 | + |
| 558 | + |
| 559 | + |
| 560 | + |
| 561 | + |
| 562 | + |
| 563 | + |
| 564 | + |
| 565 | + |
| 566 | + |
| 567 | + |
| 568 | + |
| 569 | + |
| 570 | + |
| 571 | + |
| 572 | + |
0 commit comments