test: don't show max listeners warning when running tests in parallel (#1722)

This commit is contained in:
JoelEinbinder 2018-01-04 12:08:35 -08:00 committed by Andrey Lushnikov
parent e7eacd443f
commit ed3fc47069

View File

@ -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);