summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl-deprecations.js
blob: dbd50eb469f15ad1d193a698c077833a787d8504 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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, 'DEP0075');
  assert.ok(server.parseREPLKeyword('clear'));
  assert.ok(!server.parseREPLKeyword('tacos'));
  server.close();
}