Commit a6377a9
test: increase coverage for lib/events.js
Adds tests for the case in which listeners() is invoked on a
EventEmitter with no events.
Adds a new test case for the situation in which a class
inherits from the EventEmitter but overrides the constructor
in the EventEmitter so that the _events is never set.
PR-URL: #9865
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>1 parent 65cda7f commit a6377a9Copy full SHA for a6377a9
File tree
Expand file treeCollapse file tree
1 file changed
+14
-0
lines changedOpen diff view settings
Filter options
- test/parallel
Expand file treeCollapse file tree
1 file changed
+14
-0
lines changedOpen diff view settings
Collapse file
test/parallel/test-event-emitter-listeners.js
Copy file name to clipboardExpand all lines: test/parallel/test-event-emitter-listeners.js+14Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
6 | 7 | |
7 | 8 | |
8 | 9 | |
| 10 | + |
| 11 | + |
9 | 12 | |
10 | 13 | |
11 | 14 | |
| ||
49 | 52 | |
50 | 53 | |
51 | 54 | |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
0 commit comments