adambrgmn / react-oauth-flow

An OAuth2 flow for React apps
MIT License
94 stars 37 forks source link

test: Use nock to provide more reliable tests #17

Closed adambrgmn closed 6 years ago

adambrgmn commented 6 years ago

Use nock to intercept http-request instead of mocking fetch diirectly.

Tis will create more reliable tests overall.

This commit also uninstalls whatwg-fetch and replaces it with isomorphic-fetch. I overlooked that whatwg-fetch is not written for node and thus it wont work in unit-tests.