Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
repl: Change warning text to a complete sentence.
When a REPL user explicitly assigns `_` the warning text now reads,
"Expression assignment to _ now disabled.".

Also removed an unnecessary parameter from a test helper function.
  • Loading branch information
lance committed Mar 15, 2016
commit 1471d13fb085cb037a10a8eefa7a4810bae13c2f
2 changes: 1 addition & 1 deletion lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ REPLServer.prototype.createContext = function() {
this.last = value;
if (!this.underscoreAssigned) {
this.underscoreAssigned = true;
this.outputStream.write('expression assignment to _ now disabled\n');
this.outputStream.write('Expression assignment to _ now disabled.\n');
}
}
});
Expand Down
7 changes: 3 additions & 4 deletions test/parallel/test-repl-underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function testSloppyMode() {
'undefined',
'10',
'10',
'expression assignment to _ now disabled',
'Expression assignment to _ now disabled.',
'20',
'20',
'30',
Expand Down Expand Up @@ -121,7 +121,7 @@ function testResetContext() {
`);

assertOutput(r.output, [
'expression assignment to _ now disabled',
'Expression assignment to _ now disabled.',
'10',
'10',
'Clearing context...',
Expand All @@ -131,7 +131,7 @@ function testResetContext() {
]);
}

function initRepl(mode, useGlobal) {
function initRepl(mode) {
const inputStream = new stream.PassThrough();
const outputStream = new stream.PassThrough();
outputStream.accum = '';
Expand All @@ -146,7 +146,6 @@ function initRepl(mode, useGlobal) {
useColors: false,
terminal: false,
prompt: '',
useGlobal: !!useGlobal,
replMode: mode
});
}
Expand Down