Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 1 day 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 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-10T09:55:58.000Z (about 1 year ago)
- Last Synced: 2024-04-08T16:27:53.411Z (7 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
```