-
Notifications
You must be signed in to change notification settings - Fork 26.6k
fix(common): add boolean to valid json for testing #37893
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
@@ -155,7 +159,7 @@ function _toJsonBody( | |||
throw new Error(`Automatic conversion to ${format} is not supported for Blobs.`); | |||
} | |||
if (typeof body === 'string' || typeof body === 'number' || typeof body === 'object' || | |||
Array.isArray(body)) { | |||
typeof body === 'boolean' || Array.isArray(body)) { |
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.
Since you are here, you don't need to do the Array.isArray
check because typeof body === 'object'
will be true already
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.
@ajitsinghkaler feel free to remove this in another PR
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.
LGTM from the public API point of view (type widening and assuming that we don't support extension of TestRequest). Still need the confirmation from the area owner (@alxhub)
Reviewed-for: public-api
Reviewed-for: fw-testing
5861b8c
to
78c358a
Compare
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.
LGTM
Reviewed-for: public-api
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.
Reviewed-for: public-api
@AndrewKushnir can you please run a presubmit on this |
@ajitsinghkaler FYI the presubmit went well. Here is a couple of next steps:
Thank you. |
78c358a
to
3a53973
Compare
boolean is a valid json but at present we cannot test Http request using boolean added support for boolean requests Fixes angular#20690
3a53973
to
dbb4547
Compare
@AndrewKushnir rebased it |
@alxhub can you please review this |
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.
LGTM! Thanks @ajitsinghkaler!
Reviewed-for: public-api
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.
Reviewed-for: global-approvers
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
boolean is a valid json but at present we cannot test Http request using boolean added support for boolean requests
Fixes #20690
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #20690
What is the new behavior?
Does this PR introduce a breaking change?
Other information