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

Challenge completed level: basic #29

Open
mfountoulakis opened this issue Sep 3, 2019 · 1 comment
Open

Challenge completed level: basic #29

mfountoulakis opened this issue Sep 3, 2019 · 1 comment

Comments

@mfountoulakis
Copy link

site: https://rejection.manos.now.sh/
repo: https://github.com/mfountoulakis/rejection

This was a great exercise! You left a trail of easter eggs leading right to some really nice tips about testing the redux store.

I could have submitted this exercise a lot earlier if I hadn't run into issues with testing. Specifically, unit testing connected components. The short answer is: I don't know what I'm doing.

mapStateToProps seems to be clashing with the simulated state that I'm attempting to pass to my components as props. I suspect that there's an easy solution that I'm missing here, but I will continue to write tests in other areas in the meantime, along with general refactoring.

As always, questions/comments are welcome!

@mfountoulakis
Copy link
Author

Just a note on the previous unit-testing issue. Turns out I needed to export my components separately from the Redux store. My component files now contain two exports:

  1. The component itself.
  2. The component connected to the Redux store.

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

No branches or pull requests

1 participant