How can I publish a pack from a test? I read that ...
# pact-js
а
How can I publish a pack from a test? I read that such a configuration should publish automatically, is this correct?
Copy code
const pact = new PactV4({
    consumer: 'myconsumer',
    provider: 'myprovider',
    logLevel: 'trace',
    publish: true,
    consumerVersion: '1.0.0',
    providerVersion: '1.0.0',
    pactBrokerUrl: '<http://localhost:9292>',
    dir: path.resolve("/"),
    spec: SpecificationVersion.SPECIFICATION_VERSION_V4,
  });
m
How can I publish a pack from a test? I read that such a configuration should publish automatically, is this correct?
where did you read this? It’s incorrect. You should use the CLI for this purpose: https://docs.pact.io/implementation_guides/cli
All of our examples use this (howtoexamples)
s