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

add async example tests (for #1481) #1525

Closed
wants to merge 1 commit into from
Closed

add async example tests (for #1481) #1525

wants to merge 1 commit into from

Conversation

fshowalter
Copy link
Contributor

This adds specs for the async example. It required a few changes:

  • actions
    • isomorphic-fetch changed to be called via it's global in order to mock it with fetch-mock
  • App.js
    • changed to export the un-connected component for test.
    • changed to pass it's action creators via props in order to mock them in the specs.
    • changed to fetch in componentWillMount instead of componentDidMount to test via shallow-rendering. This keeps with React's advice about when to fetch data, so win-win.

@timdorr
Copy link
Member

timdorr commented Sep 4, 2016

This will need to be rewritten because of #1883. Please resubmit!

@timdorr timdorr closed this Sep 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants