https://github.com/cba85/jest-tests-example
🎓 Jest tests example for a "fake" API using only a `POST /login` route
https://github.com/cba85/jest-tests-example
integration-testing jest unit-testing
Last synced: 9 months ago
JSON representation
🎓 Jest tests example for a "fake" API using only a `POST /login` route
- Host: GitHub
- URL: https://github.com/cba85/jest-tests-example
- Owner: cba85
- Created: 2023-10-10T09:55:23.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-10T09:55:58.000Z (about 2 years ago)
- Last Synced: 2025-01-15T07:05:58.199Z (11 months ago)
- Topics: integration-testing, jest, unit-testing
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jest tests example
Jest tests example for a "fake" API using only a `POST /login` route.
1. Unit tests
2. Integration tests (using supertest package)
## Install
```
$ npm install
```
## Usage
```
$ node index.js
```
## Tests
```
$ npx jest
```
### Coverage
```
$ npx jest --coverage
```