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.
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
This project was bootstrapped with 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.
In the project directory, you can run:
Runs the app in the development mode.
Open 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.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
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 for more information.