Questions tagged [pact-node]

10 questions
1
vote
1 answer

Pact-node dependencies are very large, any way to reduce the size?

We have implemented contract testing using pact for our Angular JS frontends and java backends. I've noticed that the node_modules/@pact-foundation directory is pretty huge (pact-node v 4.3.2) du -sh node_modules/@pact-foundation/ 741M …
1
vote
1 answer

Can I make Chai's expect.to.not.throw synchronous?

I have a snippet of code that I'm testing in Chai and Pact. It looks something like this: var myVerify = () => { provider.verify().then(() => { console.log('B verified') done() }) } expect(myVerify).to.not.throw() This works but it's a…
mmachenry
  • 1,773
  • 3
  • 22
  • 38
1
vote
3 answers

Pact exited with code 1

I'm trying to execute some tests with Pact library and I'm getting some errors. Here is the test configuration: const path = require('path'); const Pact = require('pact'); const expect = require('expect.js'); const config =…
christiansr85
  • 867
  • 19
  • 40
0
votes
1 answer

ProviderStates in Pact

From what I can tell, version 3 of the Pact spec says interactions support multiple providerStates and allows you to define parameters. I don't see this supported in the pact-web or pact-js repos. I'm using pact-web and integrating it into an…
Khoi Pham
  • 189
  • 1
  • 10
0
votes
0 answers

PACT Node - ConsumerVersionSelector - Pacticipant and Version Not Honored

OS: Mac OSX 10.15.7_ Pact: 9.15.5 Pact Node version: 10.12.2 Node Version: 12.13.0 Im sure I'm doing something wrong, but I'm not sure how to get that working. I have 2 clients (ClientA and ClientB) that have contracts (each tagged 'master')…
athurner
  • 91
  • 5
0
votes
2 answers

Specify self signed certificate in pact provider testing

I am currently testing my pact contracts using the below provider options let opts = { provider: "api", providerBaseUrl: "https://my-domain.com", pactUrls: [ path.resolve( …
gvk
  • 597
  • 7
  • 27
0
votes
1 answer

pact-js Message Consumer Contract Example not working

I want to get started with Pact to enable Consumer Driven Contracts for our asynchronous message stream architecture. Having read through most of the documentation and getting started guides by pact-foundation I tried to follow the example from…
Pa Po
  • 113
  • 1
  • 6
0
votes
0 answers

pact-js post the plain text body show "Error ocurred in mock service: JSON::ParserError - 757: unexpected token at 'Tag_PACT_1519821131303'

OS: e.g. Mac OSX 10.12.6 Consumer Pact library: e.g. Pact JS v5.5.0 Node Version: 8.2.1 there is a post restful api with post body is plain text, when i use below code to generate a consumer pact file, it show JSON ParserError, seems the pact-js…
0
votes
1 answer

Pact JS (Jest) Pact stop failed; tried calling service 10 times with no result

I'm getting an error with the Pact JS implementation on the consumer side. When I'm trying to run my tests, I'm getting the following error: Pact stop failed; tried calling service 10 times with no result. Attaching snippets of my code below if…
0
votes
1 answer

Pact.js - willRespondWith an arbitrary ordered array

my consumer service asks a provider service for a list of all users, but the provider answers with an arbitrary ordered list (which is fine). The pact execution on consumer side looks fine, but when executing it on the provider site, it says:…
S. Duclos
  • 3
  • 1
  • 2