0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/test/parallel/test-repl-null.js
Rich Trott c5afd98b48 repl: refactor repl.js
There is some unnecessary logic in repl.js. Remove it.

PR-URL: https://github.com/nodejs/node/pull/6071
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-08 13:58:48 -07:00

18 lines
435 B
JavaScript

'use strict';
require('../common');
const repl = require('repl');
const assert = require('assert');
var replserver = new repl.REPLServer();
replserver._inTemplateLiteral = true;
// `null` gets treated like an empty string. (Should it? You have to do some
// strange business to get it into the REPL. Maybe it should really throw?)
assert.doesNotThrow(() => {
replserver.emit('line', null);
});
replserver.emit('line', '.exit');