mirror of https://github.com/lukechilds/node.git
Browse Source
This method does not need to be visible to user code. It has been undocumented since it was introduced which was perhaps v0.8.9. The motivation for this change is that the method is simply an implementation detail of the REPLServer behavior, and does not need to be exposed to user code. This change adds documentation of the method with a deprecation warning, and a test that the method is actually documented. PR-RUL: https://github.com/nodejs/node/pull/14223 Refs: https://github.com/nodejs/node/issues/7619 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>v6
4 changed files with 53 additions and 17 deletions
@ -0,0 +1,16 @@ |
|||||
|
'use strict'; |
||||
|
const common = require('../common'); |
||||
|
const assert = require('assert'); |
||||
|
const repl = require('repl'); |
||||
|
|
||||
|
testParseREPLKeyword(); |
||||
|
|
||||
|
function testParseREPLKeyword() { |
||||
|
const server = repl.start({ prompt: '> ' }); |
||||
|
const warn = 'REPLServer.parseREPLKeyword() is deprecated'; |
||||
|
|
||||
|
common.expectWarning('DeprecationWarning', warn); |
||||
|
assert.ok(server.parseREPLKeyword('clear')); |
||||
|
assert.ok(!server.parseREPLKeyword('tacos')); |
||||
|
server.close(); |
||||
|
} |
Loading…
Reference in new issue