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(tests): extract getRaw(), to allow fetching HTML pages #468

Merged
merged 4 commits into from
Aug 19, 2021

Conversation

adrienjoly
Copy link
Member

@adrienjoly adrienjoly commented Aug 19, 2021

Problem

In order to write approval tests on the features covered by userLibrary.js, it would be nice if the api-client helper provided a method to fetch HTML pages too.

Proposed solution

  • extract getRaw(), to allow fetching HTML pages
  • make get() use getRaw()
  • fix, while we're at it: in case of JSON parsing error, pass that error to the callback instead of printing it to console and returning the unparsed body

@adrienjoly adrienjoly self-assigned this Aug 19, 2021
@adrienjoly adrienjoly changed the title extract getRaw(), to allow fetching HTML pages tests: extract getRaw(), to allow fetching HTML pages Aug 19, 2021
@adrienjoly adrienjoly changed the title tests: extract getRaw(), to allow fetching HTML pages fix(tests): extract getRaw(), to allow fetching HTML pages Aug 19, 2021
@adrienjoly adrienjoly marked this pull request as ready for review August 19, 2021 12:27
@adrienjoly adrienjoly merged commit bd730d9 into master Aug 19, 2021
@adrienjoly adrienjoly deleted the tests/add-getraw-method branch August 19, 2021 12:31
adrienjoly pushed a commit that referenced this pull request Aug 19, 2021
## [1.44.45](v1.44.44...v1.44.45) (2021-08-19)

### Bug Fixes

* **tests:** extract getRaw() helper, to allow fetching HTML pages ([#468](#468)) ([bd730d9](bd730d9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant