Skip to content

Commit af5c6fa

Browse files
UTAPI-116: Fix warning MaxListenersExceededWarning
In the cleanup of functional/v2/task/testCreateSnapshot.js
1 parent e8bd2fd commit af5c6fa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libV2/process.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ class Process extends EventEmitter {
3131
async join() {
3232
this.emit('exit');
3333
await this._join();
34+
['SIGINT', 'SIGQUIT', 'SIGTERM', 'uncaughtException'].forEach(eventName => {
35+
process.removeAllListeners(eventName);
36+
});
3437
}
3538

3639
async _setup() {}

0 commit comments

Comments
 (0)