Closed
Description
Hello, thanks for this nice module!
When running multiple prompts, I get this warning:
"(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit."
Tests:
var inquirer = require('inquirer');
var prompt1 = function (callback) {
inquirer.prompt([{
type: 'list',
name: 'choice',
message: 'Select:',
choices: ['one', 'two']
}], function () {
callback(callback);
});
};
var prompt2 = function () {
inquirer.prompt([{
type: 'list',
name: 'choice',
message: 'Select:',
choices: ['three', 'four']
}], function () {});
};
var prompt3 = function () {
inquirer.prompt([{
type: 'list',
name: 'choice',
message: 'Select:',
choices: ['five', 'six']
}], function () {});
};
// Test 1
prompt1(prompt1);
// Test 2
for (var i = 1; i < 11; i += 1) { prompt2(); }
// Test 3
for (var i = 1; i < 11; i += 1) { if (i % 2 === 0) { prompt2(); } else { prompt3(); } }