mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
PR-URL: https://github.com/nodejs/node/pull/59964 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
18 lines
572 B
JavaScript
18 lines
572 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const { startNewREPLServer } = require('../common/repl');
|
|
const DEFAULT_MAX_LISTENERS = require('events').defaultMaxListeners;
|
|
|
|
const { replServer, input } = startNewREPLServer();
|
|
|
|
// https://github.com/nodejs/node/issues/18284
|
|
// Tab-completion should not repeatedly add the
|
|
// `Runtime.executionContextCreated` listener
|
|
process.on('warning', common.mustNotCall());
|
|
|
|
input.run(['async function test() {']);
|
|
for (let i = 0; i < DEFAULT_MAX_LISTENERS; i++) {
|
|
replServer.complete('await Promise.resolve()', () => {});
|
|
}
|