mirror of https://github.com/nodejs/node.git
test: add test case for listeners
PR-URL: https://github.com/nodejs/node/pull/56282 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jason Zhang <xzha4350@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>pull/56318/head
parent
58b72040f2
commit
a85ef6a04a
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue