@mattersight/karma-pact-reporter
v1.0.4
Published
Karma Pact Publishing Reporter
Downloads
33
Readme
Karma Pact Reporter
Pact Node wrapper for a Karma Reporter to allow for uploading of Pact files to the Broker when complete.
Install with NPM
npm i @mattersight/karma-pact-reporter --save-dev
Set up Karma Configuration
Add 'pact' to the list of reporters.
[
{
reporters: ['pact']
}
]
Add a pactReporters section and configure according to the Pact Node Broker Publishing section.
This library does include one extra option.
Option | Type | Purpose | Default ---|---|---|--- deletePactFilesOrDirs | bool | Deletes all files in the pactFilesOrDirs array | false
Here is an example configuration:
[
{
pactReporter: {
pactBroker: process.env.PACT_BROKER_HOST || 'http://localhost',
consumerVersion: process.env.PACT_CONSUMER_VERSION || "0.0.1",
pactFilesOrDirs: [__dirname + '/pact'],
deletePactFilesOrDirs: true
}
}
]