From ed3fc4706917d6eeff9a34d8b524293cb78b86ab Mon Sep 17 00:00:00 2001 From: JoelEinbinder Date: Thu, 4 Jan 2018 12:08:35 -0800 Subject: [PATCH] test: don't show max listeners warning when running tests in parallel (#1722) --- test/test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index 595fe63e977..746be4d56f4 100644 --- a/test/test.js +++ b/test/test.js @@ -60,8 +60,9 @@ if (process.env.PPTR_PARALLEL_TESTS) const parallelArgIndex = process.argv.indexOf('-j'); if (parallelArgIndex !== -1) parallel = parseInt(process.argv[parallelArgIndex + 1], 10); +require('events').defaultMaxListeners *= parallel; -const {TestRunner, Reporter, Matchers} = require('../utils/testrunner/'); +const {TestRunner, Reporter, Matchers} = require('../utils/testrunner/'); const runner = new TestRunner({timeout, parallel}); new Reporter(runner);