• Robert Knight's avatar
    Replace Angular $http service with `window.fetch` in OAuthClient · 11ac0e25
    Robert Knight authored
    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.
    11ac0e25
oauth-client-test.js 7.87 KB