mirror of
https://github.com/nodejs/node.git
synced 2025-05-03 02:06:12 +00:00

This deprecates the current REPLServer.prototype.turnOffEditorMode and adds a private function for turnOffEditorMode which handles the necessary internal changes required instead of having them scattered about. PR-URL: https://github.com/nodejs/node/pull/15136 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
15 lines
356 B
JavaScript
15 lines
356 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const repl = require('repl');
|
|
|
|
testTurnOffEditorMode();
|
|
|
|
function testTurnOffEditorMode() {
|
|
const server = repl.start({ prompt: '> ' });
|
|
const warn = 'REPLServer.turnOffEditorMode() is deprecated';
|
|
|
|
common.expectWarning('DeprecationWarning', warn);
|
|
server.turnOffEditorMode();
|
|
server.close();
|
|
}
|