Speaker Jean-Marcel Belmont
Software Engineer at Genisys
Organizer of Code Craftsmanship Saturdays and Papers We Love Raleigh
Army Veteran, husband, and father of 2 children
This npm script executes a gulp task that does a series of actions like linting, copying files and set watchers
It wraps server in nodemon process so that changes are automatically picked up by the server.
Webpack is also monitoring changes on the front end and will hot reload code changes
I am using several testing libraries avajs, jest, testdouble, supertest, and nock
Jest is a newer testing library created by facebook that has nice integration with React although it could be used outside of react.
Jest has this concept of snapshot testing.
I added both snapshot tests and traditional unit tests for the action creators and reducers.
TAP has a focus on simplicity and originally came from PERL but has since been ported to other Programming Languages.
Testdoublejs is a mocking library like sinon.js but with a smaller api surface.
Nock is an HTTP mocking and expectations library for Node.js
Nock can be used to test modules that perform HTTP requests in isolation.
Super-agent driven library for testing node.js HTTP servers using a fluent API
I am using Nock in conjunction with Supertest to both hit my api endpoints and mock out responses for the endpoints.
I have a Travis CI Yaml Script
Additionally I have the code coverage tool called Coveralls hooked into Continuous Integration.
I am using a small npm module called dotenv that reads into environment variables into process.env
Using a linting library like Eslint will help catch errors before they occur
They also help keep coding styles in sync in larger projects.
The whole state of your app is stored in an object tree inside a single store.
The only way to change the state tree is to emit an action, an object describing what happened.
To specify how the actions transform the state tree, you write pure reducers.
React Router is a complete routing library for React.