Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

btrz-pact

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

btrz-pact

The pact lib for Betterez

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

btrz-pact

Pact library for Betterez APIs consumers. Is a requirement to have a pact broker server to connect with.

Features:

Publish and Verify the consumer pacts to the Betterez pact_broker

How to use

Initializing btrz-pact

let options = {
  brokerUrl: "localhost",
  user: "",
  pass: ""
};
btrzPact = new BtrzPact(options);

Publish pacts

let pactList = ["path/to/pact"]; // or use a folder containing pacts to publish
let version = "1.0.0";
btrzPact.publish(pactList, version)
  .then(() => {
    // do your stuff here...
  })
  .catch((err) => {
    // process error
  });
    

Verify pacts

let providerBaseUrl = "host/to/api/endpoint";
let pactList = ["path/to/pact"]; // or use a folder containing pacts to verify
btrzPact.verify(providerBaseUrl, pactList)
  .then(() => {
      // do your stuff here...
    })
    .catch((err) => {
      // process error
    });

Keywords

FAQs

Package last updated on 26 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc