@mattersight/karma-pact-reporter

1.0.4 • Public • Published

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.

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

Dependencies (2)

Dev Dependencies (1)

Package Sidebar

Install

npm i @mattersight/karma-pact-reporter

Weekly Downloads

7

Version

1.0.4

License

MIT

Last publish

Collaborators

  • austinagile
  • nicholas.brink