Integration tests: Fake it till you make it!

What are integration tests?

Case study

"scripts": {
"test": "mocha test/unit/*.test.js",
"test-integration": "docker-compose -f ./test/integration/docker-compose.yaml up --force-recreate --build --remov
e-orphans --exit-code-from integration-tests integration-tests && docker-compose -f ./test/integration/docker-compose.yaml down --remove-orphans",
"test-integration-verbose": "docker-compose -f ./test/integration/docker-compose.yaml up --force-recreate --build --remove-orphans --exit-code-from integration-tests integration-tests dogs-api employees-api dog-scheduling-service email-sending-service && docker-compose -f ./test/integration/docker-compose.yaml down --remove-orphans",
"start": "node src/server.js"
},
- request:
method: GET
url: /api/v1/employee/11/emailAddress
response:
status: 200
body: >
"ricksanchez@soluto.com"

Wrap-up

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store