An example React app with component integration tests that demonstrate Consumer Driven Contract in practice.
This example uses the following stack for testing:
- PactJS - A JavaScript implementation of the Pact spec that is used with the tests to guarantee that contract dependencies are satisfied
- Cucumber.js - Testing interface that allows us to write plain English tests specs in Gherkin
- WebdriverIO - Test runner abstraction on top of Selenium that allows us to write integration tests via the browser
Using npm
with:
npm install
npm start
This should compile the project and start a webpack server with the hot reload module on http://localhost:3000
.
Run the integration testsuite by:
npm run integration-test
- This code was an original fork of
react-imdb
; a simple app that wraps the The Open Movie Database (OMDb API) and demonstrates searching of the api.