Skip to content

Commit

Permalink
test: add test case for listeners
Browse files Browse the repository at this point in the history
PR-URL: #56282
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
  • Loading branch information
origranot authored and aduh95 committed Jan 2, 2025
1 parent db83d2f commit e9762bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/parallel/test-event-emitter-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ function listener4() {
assert.deepStrictEqual(ee.listeners('foo'), []);
}

{
const ee = new events.EventEmitter();
assert.deepStrictEqual(ee.listeners(), []);
}

{
class TestStream extends events.EventEmitter {}
const s = new TestStream();
Expand Down

0 comments on commit e9762bf

Please sign in to comment.