Skip to content
Permalink
Browse files

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 <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
  • Loading branch information...
cjihrig committed Apr 19, 2017
1 parent 58066d1 commit 5e095f699e2f7253cd151c0a829dd020c78d2487
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/parallel/test-event-emitter-max-listeners-warning.js
@@ -19,4 +19,5 @@ process.on('warning', common.mustCall((warning) => {
}));

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

0 comments on commit 5e095f6

Please sign in to comment.
You can’t perform that action at this time.