I am trying to run the consumer tests using the te...
# pact-js
j
I am trying to run the consumer tests using the test script - https://github.com/pact-foundation/pact-js/blob/master/examples/nestjs-consumer/package.json, but i am getting below error while publishing the contract
Copy code
PactBroker::Client::Error - Please specify the consumer_version_number
m
That error would happen if
--consumer-app-version
is not properly set. Have you got any more info as to why that might be?
y
Can you run
npx @pact-foundation/absolute-version
that is being passed into the command property
--consumer-app-version
https://github.com/pact-foundation/pact-js/blob/5e14137542373752c89c5d5db54c43f79cca6b0c/examples/nestjs-consumer/package.json#L15
j
Copy code
npm ERR! cb.apply is not a function
getting this while running
Copy code
npx @pact-foundation/absolute-version
i have cleared the cache and rerun it got some value for consumer version nw- 9.17.3-master+4.730f3c8.SNAPSHOT.JithinMac. but publish still failed
Copy code
2.5.1/lib/json/common.rb:216:in `parse': 757: unexpected token at '<!doctype html> (JSON::ParserError)
m
run with verbose/debug mode. That looks like you’re receiving an HTML document. The usual reasons for this: 1. Incorrect broker host URL 2. Proxy
j
thanks, able to set it up nw
m
what was the issue?
j
broker url was incorrect, i had to replace default one with mine
👍 1
m
Can I ask, is there something we could have done differently to make that more obviously for you?
j
add a readme, that would be great, i am new to contract testing, still learning how it works
m
Add a readme to …?