Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes 03-04 – Unit and integration tests #4

Open
wants to merge 12 commits into
base: 03-server-application-design
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules
lib
coverage
.nyc_output
.vscode
8 changes: 8 additions & 0 deletions docs/04-unit-and-integration-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## 04 – Unit and Integration Tests

Let's test our service implementations, endpoint functions, middlewares and all other kinds of code through unit tests.
Also handling integration tests in the sense of doing HTTP requests against the running service. Try it out:

1. `npm test` – Will run Prettier check, unit tests, and NPM security audit of dependencies
2. `npm run test:unit` – Runs only the unit tests
3. `npm run test:integration` (start server manually before) – Executes the ingration tests on top of the running service
Loading