Skip to content
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

fix(common): add boolean to valid json for testing #37893

Closed
wants to merge 3 commits into from

Conversation

ajitsinghkaler
Copy link
Contributor

@ajitsinghkaler ajitsinghkaler commented Jul 2, 2020

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?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #20690

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@ajitsinghkaler ajitsinghkaler marked this pull request as draft Jul 2, 2020
@ajitsinghkaler ajitsinghkaler marked this pull request as ready for review Jul 2, 2020
@@ -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)) {
Copy link
Contributor

@alfaproject alfaproject Jul 3, 2020

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

Copy link
Member

@petebacondarwin petebacondarwin Jul 22, 2020

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

Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

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

Copy link
Member

@jelbourn jelbourn left a comment

LGTM

Reviewed-for: public-api

@pullapprove pullapprove bot removed the request for review from IgorMinar Jul 22, 2020
Copy link
Member

@petebacondarwin petebacondarwin left a comment

Reviewed-for: public-api

@ajitsinghkaler
Copy link
Contributor Author

@ajitsinghkaler ajitsinghkaler commented Jul 29, 2020

@AndrewKushnir can you please run a presubmit on this

@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Jul 29, 2020

@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Jul 29, 2020

@ajitsinghkaler FYI the presubmit went well. Here is a couple of next steps:

  • could you please rebase this PR to re-run CI with the most up-to-date version? (it looks like this PR was rebased 21 days ago)
  • this PR needs approval from fw-core and fw-http groups (@alxhub could you please have a quick look when you get a chance?)

Thank you.

@ajitsinghkaler
Copy link
Contributor Author

@ajitsinghkaler ajitsinghkaler commented Jul 30, 2020

@AndrewKushnir rebased it

@ajitsinghkaler
Copy link
Contributor Author

@ajitsinghkaler ajitsinghkaler commented Sep 17, 2020

@alxhub can you please review this

@pullapprove pullapprove bot requested a review from IgorMinar Sep 28, 2020
Copy link
Contributor

@IgorMinar IgorMinar left a comment

LGTM! Thanks @ajitsinghkaler!

Reviewed-for: public-api

@pullapprove pullapprove bot requested a review from IgorMinar Oct 5, 2020
Copy link
Contributor

@IgorMinar IgorMinar left a comment

Reviewed-for: global-approvers

@IgorMinar IgorMinar removed the request for review from alxhub Oct 5, 2020
@ajitsinghkaler ajitsinghkaler deleted the boolean-test branch Oct 6, 2020
@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Nov 6, 2020

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.