https://github.com/akullpp/consumer-driven-contracts
https://github.com/akullpp/consumer-driven-contracts
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/akullpp/consumer-driven-contracts
- Owner: akullpp
- License: mit
- Created: 2019-07-15T16:04:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:54:52.000Z (over 3 years ago)
- Last Synced: 2025-03-06T05:33:12.822Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://chrysanthium.com/consumer-driven-development
- Size: 453 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Consumer-driven Contracts
Contains the consumer-driven contract tests against the [JSONPlaceholder API](https://jsonplaceholder.typicode.com).
## Usage
Install dependencies:
```bash
npm i
```
Run tests:
```bash
npm test
```
## Development
### Contracts
Create the contracts in `test/helper/contracts` which exports an object with the `request` and `schema` keys.
#### Requests
The value for the request can be provided by [faker](https://github.com/marak/Faker.js/).
#### Responses
The validation of the response can be done with [Joi](https://github.com/hapijs/joi).