kontent-boilerplate-express-apollo
kontent-boilerplate-express-apollo copied to clipboard
Set up Tests
Motivation
It would be great to have a Continuous pipeline with the tests running for all pull requests.
Proposed solution
- Choose the testing framework (we are already using Jest it is preferred one).
- Set up the test infrastructure for test
- Implement npm script called test that will run all tests
- Implement one integration test that checks the site renders three articles with specified titles
Additional context
- https://jestjs.io/docs/en/testing-frameworks#expressjs
- https://hackernoon.com/testing-node-js-in-2018-10a04dd77391
- https://medium.com/@jodylecompte/express-routes-a-tdd-approach-1e12a0799352