mirror of https://github.com/lukechilds/node.git
Browse Source
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>canary-base
committed by
Ruben Bridgewater
3 changed files with 40 additions and 12 deletions
@ -0,0 +1,14 @@ |
|||
'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(); |
|||
} |
Loading…
Reference in new issue