Replace Angular $http service with `window.fetch` in OAuthClient
As part of the migration away from AngularJS, replace `$http` with `fetch` in the OAuthClient class which handles interactions with h's OAuth endpoints. For testing use the fetch-mock library that is already used in h's frontend tests. The current version (v7) has dependencies that are written in ES6 and not transpiled, and so don't work in PhantomJS [1]. As a workaround, use v6 of the library for the time being. This is part of #974. [1] We _do_ transpile our own code from ES6 -> ES5 but that transform is not applied to dependencies.
Showing
... | @@ -53,6 +53,7 @@ | ... | @@ -53,6 +53,7 @@ |
"exorcist": "^1.0.1", | "exorcist": "^1.0.1", | ||
"express": "^4.14.1", | "express": "^4.14.1", | ||
"extend": "^3.0.2", | "extend": "^3.0.2", | ||
"fetch-mock": "6", | |||
"gulp": "^4.0.0", | "gulp": "^4.0.0", | ||
"gulp-batch": "^1.0.5", | "gulp-batch": "^1.0.5", | ||
"gulp-changed": "^3.2.0", | "gulp-changed": "^3.2.0", | ||
... | ... |
Please register or sign in to comment