-
Notifications
You must be signed in to change notification settings - Fork 44.8k
Reformat test parameters for consistency #369
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
Conversation
|
@CouchofTomato hello I don't believe the maintainer is active in reviewing PR anymore right now |
|
@cats256 We definitely should align how the Odin solutions are written (either with rest params or passing in arrays). My only issue with using rest param instead of passing in an array for the exercise is I don't believe we really go over rest param other than as an additional resource (which isn't required reading). I feel like if we want to go forward with this update, it may be worth moving "Fundamentals Part 5" additional resource to the assignment, so users will at least understand what the rest parameter is (this would be done in our curriculum repo). The alternative is revert the update made to the multiply solution to accept an array. |
Alright I made the multiply solution to accept an array as well as the calculator.spec.js to expect an array parameter as well (pretty much the same as calculator-solution.spec.js but with test.skip and require ./calculator instead of ./calculator-solution). calculator-solution.spec.js is no longer changed since the original file was fine and expect an array instead of rest parameters for the multiply solution. |
Reformat test parameters for consistency
Reformat test parameters for consistency
Because
Reformat test parameters allow for more consistency
This PR
Modified the test for the sum function in calculator.spec.js, as well as the sum and multiply functions in calculator-solution.spec.js file to expect rest parameters instead of expecting an array parameter. Modified the sum function in calculator-solution.js to work with the new test for the sum function. There was no need to modify the multiply function in calculator-solution.js as it already expects rest parameters