0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-repl-turn-off-editor-mode.js
Lance Ball e416b3ee36
repl: deprecate turnOffEditorMode
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>
2017-09-28 01:54:03 -03:00

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();
}