-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repl: fix repl .load #28608
repl: fix repl .load #28608
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
This makes sure that complete functions work as expected after using the REPL's `.load` command. It also fixes the corresponding test. So far the assertion where swallowed and the test passed even though it should not have. Fixes: #28546
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,9 @@ const expected = `${command} | |
const getLunch = () => | ||
placeOrder('tacos') | ||
.then(eat); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Superfluous change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, that's the bug fix mentioned here: #28608 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, we're in a string template here, which wasn't obvious from the GitHub interface. I see now. |
||
const placeOrder = (order) => Promise.resolve(order); | ||
const eat = (food) => '<nom nom nom>'; | ||
|
||
undefined | ||
`; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changed behavior here is also a bugfix: in case the saved load would be a template string with multiple line breaks, it would have changed the users data. That is not good and we should always load all data 1-to-1.