Repository navigation
Conversation
Member
Author
| const assert = require('assert'); | ||
| const repl = require('repl'); | ||
|
|
||
| { |
Contributor
There was a problem hiding this comment.
Why this block is necessary?
Member
Author
There was a problem hiding this comment.
It's there so that if we write a subsequent test (such as to test that context is sent on tab completion), we can make sure there are no side effects (because the variables are scoped to the block).
Contributor
There was a problem hiding this comment.
Due to block-scoped vars (i.e. let and const) this feature, though existing in es5, is now actually useful.
Member
Author
Contributor
|
LGTM |
| eval: common.mustCall((cmd, context) => { | ||
| // Assertions here will not cause the test to exit with an error code | ||
| // so set a boolean that is checked in process.on('exit',...) instead. | ||
| evalCalledWithExpectedArgs = (cmd === 'foo\n' && context.foo === 'bar'); |
Contributor
There was a problem hiding this comment.
I think the parens here are unnecessary?
Member
Author
There was a problem hiding this comment.
That's right. They're just there for clarity. If they're objectionable, I can remove them.
Member
|
LGTM |
Member
Author
|
Landed in 90451a6 |
Member
|
Belated LGTM FWIW. Thanks for picking this up. :-) |
Merged
stefanmb
pushed a commit
to stefanmb/node
that referenced
this pull request
Feb 23, 2016
Fixes: nodejs#3544 PR-URL: nodejs#5192 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #3544