Skip to content
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

Fix test function arguments for whilst/until/during #1224

Merged
merged 4 commits into from
Jul 10, 2016
Merged

Conversation

aearly
Copy link
Collaborator

@aearly aearly commented Jul 10, 2016

Closes #1217.

cc @megawac

return ++calls <= 1 || test.apply(this, arguments);
}, fn, callback);
export default function doWhilst(iteratee, test, callback) {
callback = callback || noop;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets once wrap this

@megawac
Copy link
Collaborator

megawac commented Jul 10, 2016

👍 I like this resolution. Another option would be to change the test expected definition to

test(callback, arrayofarguments)

@aearly
Copy link
Collaborator Author

aearly commented Jul 10, 2016

I think this is the best solution. Either you have a test function that has a different signature the first time its called, you create an async function that doesn't have a callback as its last arg, or you avoid the situation entirely.

@aearly aearly merged commit c148bbe into master Jul 10, 2016
@megawac
Copy link
Collaborator

megawac commented Jul 10, 2016

Can you update changelog

@megawac megawac deleted the whilst-test-params branch July 10, 2016 02:00
@aearly
Copy link
Collaborator Author

aearly commented Jul 10, 2016

88dab8c :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants