1.0.4 • Published 6 years ago

@mattersight/karma-pact-reporter v1.0.4

Weekly downloads
14
License
MIT
Repository
github
Last release
6 years ago

Karma Pact Reporter

Pact Node wrapper for a Karma Reporter to allow for uploading of Pact files to the Broker when complete.

Travis npm npm npm npm

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.

OptionTypePurposeDefault
deletePactFilesOrDirsboolDeletes all files in the pactFilesOrDirs arrayfalse

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
        }
    }
]