anshumanv / evolutions-webapp

What? monferno is evolving!
https://evolutions.js.org
MIT License
17 stars 17 forks source link

Add unit tests for components #50

Closed grug closed 6 years ago

grug commented 6 years ago
Closes #{45} #### By submitting this pull request I confirm I've read and complied with the below declarations. - [X] I have tested the changes locally and they are functional. - [X] I ensure that my commit message is in imperative manner. - [X] I ensure that I have properly referenced the related issue. - [ ] I ensure that I sent this pull request after being assigned to the corresponding issue. - [X] This pull request has a descriptive title. For example, `Add/Fix {Feature/Bug}`, not `Update README.md` or `Add new code`. - [X] This pull request will be closed if I fail to update it even once in a continuous time span of 7 days. I've added the base set of unit tests that this project should have (in my opinion :) ). I have added Enzyme as a dependency and hooked that up to the project in `src/setupTests.js` (as this is what CRA requires). I've also removed constructors from the components as the function binding doesn't need to happen and you can assign a default state using the `state = {}...` syntax at a class level, rather than constructor level. Let me know if anything else needs to be done for this PR.
grug commented 6 years ago

Hang on - I've broken some unit tests as I hadn't run the tests after merging with origin/master - I'll fix those now :)