Skip to content

Conversation

@nfcampos
Copy link
Contributor

  • fetch rejects rarely, but it does happen (eg. when the request times out), see https://fetch.spec.whatwg.org/#fetch-method for details
  • fixed promise chaining in RefetchConnect#createPromise
  • added tests for this behaviour
    • added another branch to our testing fetch stub (which rejects the promise)
    • added rejected fetch case to the 'should should props and promise state to the given component' test
    • tested that catch and andCatch handlers of a rejected request are called

- fetch rejects rarely, but it does happen (eg. when the request times out), see https://fetch.spec.whatwg.org/#fetch-method for details
- fixed promise chaining in RefetchConnect#createPromise
- added tests for this behaviour
  - added another branch to our testing fetch stub
  - added rejected fetch case to the 'should should props and promise state to the given component' test
  - tested that catch and andCatch handlers of a rejected request are called
@ryanbrainard
Copy link
Contributor

Thanks for fixing this!

@ryanbrainard ryanbrainard merged commit 4a5570d into heroku:master Apr 12, 2016
@ryanbrainard
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants