Configure testing and add some sample tests #176
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
create-react-app
's testing guide to setup something we can use to write tests going forward:enzyme
(project by airbnb) for component testing. Seems like most in the react community use this in some shape or formwebsite
in travis-ci.org? I can tweak it later.Note:
jest
+enzyme
to work with the current versions of our dependecies. I ended up upgrading all of them - minor version only though! Except forreact-scripts
, which I needed the next major version, per one of the react maintainers: Mac OS test watcher failing facebook/create-react-app#4215 (comment) If needed, I can go back and upgrade only what is needed, but the site seemed fine.new
keyword in conjunction with the reducer functions was causing aNot a constructor
errors by webpack in the dev server. It looks the reducers already return new objects using the spread operator, so I removed thenew
keyword as it didn't seem necessary, but @jeffmcaffer you may want to take a look. See commit 3bbafb2