-
Notifications
You must be signed in to change notification settings - Fork 69
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
the task is complete #58
base: master
Are you sure you want to change the base?
Conversation
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.
Great job on implementing the reduce
function and writing comprehensive test cases! 🎉 Your code meets the task requirements and constraints effectively. While there are a few minor issues with ESLint configuration and test descriptions, they do not impact the core functionality. Consider addressing these in future updates to enhance code clarity and maintainability. Keep up the good work! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
}, | ||
rules: { | ||
'no-proto': 0 | ||
"no-proto": 0, | ||
quotes: "off", |
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 quotes
rule is set to "off", which means ESLint will not enforce any quote style. If you want to enforce a specific quote style (e.g., single or double quotes), consider setting this rule to "single" or "double".
}, | ||
rules: { | ||
'no-proto': 0 | ||
"no-proto": 0, |
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 no-proto
rule is disabled, which allows the use of the __proto__
property. This can lead to security vulnerabilities and is generally discouraged. Consider enabling this rule by setting it to "error"
or "warn"
.
expect(Array.prototype.reduce2).toBeInstanceOf(Function); | ||
}); | ||
|
||
it(`should be correctly if 'startValue' === 0`, () => { |
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 test description should be correctly if 'startValue' === 0
could be improved for clarity. Consider rephrasing it to something like should return the correct result when 'startValue' is 0
.
expect(result).toBe(6); | ||
}); | ||
|
||
it(`should be correctly if 'startValue' > 0`, () => { |
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 test description should be correctly if 'startValue' > 0
could be improved for clarity. Consider rephrasing it to something like should return the correct result when 'startValue' is greater than 0
.
|
||
it(`should be correctly if without 'startValue'`, () => { |
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 test description should be correctly if without 'startValue'
could be improved for clarity. Consider rephrasing it to something like should return the correct result when 'startValue' is not provided
.
expect(result).toBe(6); | ||
}); | ||
|
||
it(`should be correctly if string array`, () => { |
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 test description should be correctly if string array
could be improved for clarity. Consider rephrasing it to something like should concatenate strings correctly when reducing a string array
.
No description provided.