Demonstrates:
- that we can put assumptions in our unit tests that aren't valid
- Pact tests are nothing scary, and look much like the use of
nock
Running step 1:
npm run test:consumer
npm run test:pact:consumer
npm run test:pact:publish
Demonstrates:
- the assumptions in step 1 by the consumer team are wrong (failed test)
- teams need to communicate with each other
- use of flexible matching to make tests less brittle
Running step 2
npm run test:pact:consumer
npm run test:pact:publish
npm run test:pact:provider
Two problems
- qty -> quantity difference
- value -> itemValue
Demonstrates:
- fixes
qty
anditemValue
properties in provider test - contract testing validates assumptions from both collaborators
Running step 3
npm run test:pact:consumer
npm run test:pact:publish
npm run test:pact:provider
Demonstrates:
- sharing and collaborating on contracts via the Pact Broker
- how you might integrate Pact into your CI and CD pipelines
Running step 4
npm run test:pact:consumer
npm run test:pact:publish
npm run test:pact:provider
npm run can-i-deploy:consumer
npm run can-i-deploy:provider