-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Pull Requests #2158
base: ChardPeter
Are you sure you want to change the base?
Pull Requests #2158
Conversation
Thank you for the submission, @ChardPeter! I'll review your code shortly, hang tight. |
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 a great attempt, @ChardPeter!
I would like to request a few changes before merging your work. Please review my comments below and make the appropriate changes to your code.
After you update your code locally, follow the instructions to save your changes locally and push your changes to your fork.
When you push your changes to your fork, I'll come back for another review.
There are 2 style guide violations in your contribution. I've marked them with inline comments for your convenience.
Please revisit your code and follow the style guide best practices.
Hint: You might be able to fix some issues automatically by running npm run lint -- --fix
There are 2 tests failing. Please revisit your code and make the failing tests pass.
❌ _check should throw a TypeError if arguments are not numbers
-actual
+expected
-
+function TypeError() { [native code] }
AssertionError: expected [Function] to throw TypeError
at Context.<anonymous> (src/calculator.test.js:14:54)
at processImmediate (node:internal/timers:464:21)
❌ _check "after each" hook for "should throw a TypeError if arguments are not numbers"
TypeError: calculator._check.restore is not a function
at Context.<anonymous> (src/calculator.test.js:10:23)
at processImmediate (node:internal/timers:464:21)
@@ -1,9 +1,11 @@ | |||
exports._check = () => { | |||
exports._check = (x, y) => { |
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.
'y' is defined but never used.
(learn more)
@@ -1,9 +1,11 @@ | |||
exports._check = () => { | |||
exports._check = (x, y) => { | |||
// DRY up the codebase with this function | |||
// First, move the duplicate error checking code here | |||
// Then, invoke this function inside each of the others | |||
// HINT: you can invoke this function with exports._check() | |||
}; |
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.
Expected indentation of 2 spaces but found 0.
(learn more)
I am not able to install npm onto my PC as this is my work computer. And can you please expand as to what you mean by y was defined but never used. |
Refactor _check function and update test suite