Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
repl: do not consider `...` as a REPL command #14467
Thanks for the contribution! Please add a test! REPL tests can be tricky, but this is probably something that can be tested by adding something to
test/parallel/test-repl.js. Additional info about our tests in general can be found in https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md
Change looks good. For adding a test, check out https://github.com/nodejs/node/blob/master/test/parallel/test-repl.js.
That's something that should be investigated separately. Any kind of invalid syntax does it, but is has its uses too:
Same also works on the shell:
The question is if it can be determined if a line can never be valid, like
As a first step, I'm fine if you just make sure it not gets parsed as a REPL command.
Because my test case is leaving the REPL in an inconsistent state, the tests that follow my new test fails ...