-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There is some unnecessary logic in repl.js. Remove it. PR-URL: #6071 Reviewed-By: James M Snell <[email protected]>
- Loading branch information
Showing
2 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'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'); |