-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
#15230 Add positive integration scenario. #15232
base: develop
Are you sure you want to change the base?
Conversation
Due to lack of positive integration tests in repository I decided to add one for "/bug-report" endpoint.
On CI/CD there was one test failing due to my mistake with comparing object properties. I was mentioned hasOwnProperties, but I've tried wrongly to simplify to if statement.
Following eslint issues and commit about `.editorcofig` from AccioBooks <[email protected]> on 8/31/2016 at 7:44 PM I decided to fix all wrongly encoded new lines. Based on article https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/ it should help in long term to keep new line issues in the future.
@SabreCat it seems to be ready to be reviewed 😄 |
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.
Just a question on the requester.js change but otherwise LGTM
@@ -99,7 +99,13 @@ function _parseRes (res) { | |||
message: res.body.message, | |||
}; | |||
} | |||
return res.body.data; | |||
if (Object.prototype.hasOwnProperty.call(res.body, 'data')) { |
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.
Could you tell me why this change is needed? this doesn't seem to be needed for the test above or I'm missing something 😬
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.
Because there are almost no of positive testing in repository. I had to modify requester logic.
if (res.body.message) {
return {
data: res.body.data,
message: res.body.message,
};
}
So far it was returning only if message was included.
For this test I basically need whole response if there is any. So that's why I need to expand this class.
Due to lack of positive integration tests in repository I decided to add one for "/bug-report" endpoint.
Fixes put_#_and_issue_number_here
Changes
UUID: