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.
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
set autostart to false #36
set autostart to false #36
Changes from 2 commits
10e5b51
f216e07
bdc53ed
8bf9492
e21fa90
6f3af33
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This was the only cause of some problems in the testing - since passing
option = { autoStart: true }
means that the source is not used even if it is not a source expression.I've got around this by setting the options to undefined if the only key is
autoStart
- but I'm thinking that the tests should just be changed insteadThere 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.
I'm sorry, I've been looking at this for 15 minutes now but still don't understand.
So the logic of the
SimpleTransformIterator
is that both of its parameters (source
andoptions
) are optional.So what the original line 1224 is doing is determining whether
options
is the first or the second argument (given thatsource
is optional, it might change position). The easy case is whenoptions
is non-nullish: thenoptions
is the second argument. Ifoptions
is nullish, thenoptions
is the first argument—if that first argument is not a source.None of that should change, regardless of the
autoStart
default. So probably a test change indeed.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.
Makes sense - will do a test change then :)
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.
That is a bit weird to me; I'll investigate.
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.
Was using undefined to emulate the existing test with no sources. An empty array should work as well instead.
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.
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.
This is where this change will get a bit annoying, but I think it's important that the test structure remains the same. So first "without arguments" (so don't pass anything) and then the other cases.
(Note that the description and code are out of sync too.)