mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
e416b3ee36
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();
|
|
}
|