Skip to content

Commit 5e095f6

Browse files
committed
test: verify listener leak is only emitted once
When a possible listener leak is detected, a warning is emitted. This commit updates an existing test to verify that the warning is only emitted once. PR-URL: #12502 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 58066d1 commit 5e095f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parallel/test-event-emitter-max-listeners-warning.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ process.on('warning', common.mustCall((warning) => {
1919
}));
2020

2121
e.on('event-type', common.noop);
22-
e.on('event-type', common.noop);
22+
e.on('event-type', common.noop); // Trigger warning.
23+
e.on('event-type', common.noop); // Verify that warning is emitted only once.

0 commit comments

Comments
 (0)