https://github.com/paucls/pact-consumer-contract-react-example
An example of a Pact consumer contract test for the communication between a React application and a backend API.
https://github.com/paucls/pact-consumer-contract-react-example
consumer-driven-contracts pact pact-tests
Last synced: 3 months ago
JSON representation
An example of a Pact consumer contract test for the communication between a React application and a backend API.
- Host: GitHub
- URL: https://github.com/paucls/pact-consumer-contract-react-example
- Owner: paucls
- Created: 2017-02-06T11:02:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-06T11:04:02.000Z (over 8 years ago)
- Last Synced: 2025-02-06T09:13:57.248Z (5 months ago)
- Topics: consumer-driven-contracts, pact, pact-tests
- Language: JavaScript
- Size: 30.3 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pact-consumer-contract-react-example
An example of a Pact consumer contract test for the communication between a React application and a backend API. The domain
is a simple "Give Us Feedback" functionality.## Documentation
Links to some of the articles and documentation used to implement this project:
- Pact JS
https://github.com/pact-foundation/pact-js
- Pact Node wrapper
https://github.com/pact-foundation/pact-node
- Consumer Driven Contracts using Pact
http://blog.scottlogic.com/2017/01/10/consumer-driven-contracts-using-pact.html
- Getting started with Pact testing, Charlie Gerard
http://charliegerard.github.io/blog/getting-started-pact-testing/
- PACT Best practices
https://github.com/realestate-com-au/pact/wiki/Best-practices## Available Scripts
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
Below you will find some information on how to perform common tasks.
You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).In the project directory, you can run:
### `npm start`
Runs the app in the development mode.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.The page will reload if you make edits.
You will also see any lint errors in the console.### `npm test`
Launches the test runner in the interactive watch mode.
See the section about [running tests](#running-tests) for more information.### `npm run build`
Builds the app for production to the `build` folder.
It correctly bundles React in production mode and optimizes the build for the best performance.The build is minified and the filenames include the hashes.
Your app is ready to be deployed!See the section about [deployment](#deployment) for more information.