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>
22 lines
741 B
JavaScript
22 lines
741 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { startNewREPLServer } = require('../common/repl');
|
|
|
|
const { replServer, input } = startNewREPLServer({}, { disableDomainErrorAssert: true });
|
|
|
|
// https://github.com/nodejs/node/issues/3346
|
|
// Tab-completion should be empty
|
|
input.run(['.clear', 'function () {']);
|
|
replServer.complete('arguments.', common.mustCall((err, completions) => {
|
|
assert.strictEqual(err, null);
|
|
assert.deepStrictEqual(completions, [[], 'arguments.']);
|
|
}));
|
|
|
|
input.run(['.clear', 'function () {', 'undef;']);
|
|
replServer.complete('undef.', common.mustCall((err, completions) => {
|
|
assert.strictEqual(err, null);
|
|
assert.deepStrictEqual(completions, [[], 'undef.']);
|
|
}));
|