Integration testing means checking if different modules are working fine when combined together as a group.If you want a better final product, you need integration testing because can detect any change in the flow. Let's code a integration resting with jest and supertest
- Test our home page "/"
- Test the authorization validation "/pages"
- Test if we return all the data from an endpoint "/pages"
- Test if we return a specific element "/pages/1"
- Test error message when we cannot find a specific data "/pages/15"
- Node >= 8.10
- npm >= 5.6
Clone this repository
git https://github.com/ideas2codedev/Integration-Testing-with-jest-supertest-nodejs-express.git
Move to root folder and run:
npm install
Now let's start our application run:
npm start
Now let's test our application run:
npm test
NodeJS
Express
Jest
SuperTest

