summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl-null.js
blob: 18009558eda4b5c6b17e73976201632470fbb6a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
'use strict';
require('../common');
const repl = require('repl');

const 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?)

replserver.emit('line', null);
replserver.emit('line', '.exit');