Files
getting-started/pact/pact-angular
Tom Hombergs 8b384c602b updated README
2018-10-25 21:10:22 +02:00
..
2018-01-08 22:32:55 +01:00
2018-01-08 22:32:55 +01:00
2018-01-08 22:32:55 +01:00
2018-01-08 22:32:55 +01:00
2018-10-25 21:10:22 +02:00

Angular Pact example

This example project shows how to setup an Angular application to use Pact in order to create Pact files from a consumer test and validate the a consumer against the Pact.

Relevant Blog Post

Creating a Consumer-Driven Contract with Angular and Pact

Key Files

How to Run

Run npm install to load the needed javascript libraries and then npm run test to run the tests. After the tests have successfully run the created pact file will be created in the folder pacts.

Then, you can call npm run publish-pacts to publish the pact files to a Pact Broker. You must set the following npm configs for the publish-pacts script to work:

npm config set angular-pact:brokerUrl <URL>
npm config set angular-pact:brokerUsername <USER>
npm config set angular-pact:brokerPassword <PASS>