Skip to content

Instantly share code, notes, and snippets.

@jameshd
Created May 10, 2019 10:49
Show Gist options
  • Save jameshd/6c0cdb00a096996bed1368b4026e98bc to your computer and use it in GitHub Desktop.
Save jameshd/6c0cdb00a096996bed1368b4026e98bc to your computer and use it in GitHub Desktop.
debug-pact
+ yarn pact:test
yarn run v1.9.4
$ cross-env && jest --testRegex "./src/test/pact/.*/*(.test.pact.js)" --runInBand --setupFiles ./src/test/pact/pactSetup.js --setupTestFrameworkScriptFile ./src/test/pact/pactTestWrapper.js
[2019-05-10T10:32:18.071Z]  INFO: pact-node@8.2.0/118 on 054a1c2ace0f:
 Creating Pact Server with options:
consumer = fe-fragment-product,
cors = true,
dir = /var/lib/jenkins/jobs/FE Fragment Product/branches/pact-testing/workspace@2/pacts,
host = 127.0.0.1,
log = /var/lib/jenkins/jobs/FE Fragment Product/branches/pact-testing/workspace@2/logs/mockserver-integration.log,
pactFileWriteMode = update,
port = 8989,
provider = selling-product-query,
spec = 2,
ssl = false,
sslcert = ,
sslkey = 
[2019-05-10T10:32:18.750Z]  INFO: pact-node@8.2.0/118 on 054a1c2ace0f: Created './standalone/linux-x64-1.64.1/bin/pact-mock-service service --consumer 'fe-fragment-product' --cors 'true' --pact_dir '/var/lib/jenkins/jobs/FE Fragment Product/branches/pact-testing/workspace@2/pacts' --host '127.0.0.1' --log '/var/lib/jenkins/jobs/FE Fragment Product/branches/pact-testing/workspace@2/logs/mockserver-integration.log' --pact-file-write-mode 'update' --port '8989' --provider 'selling-product-query' --pact_specification_version '2'' process with PID: 132
[2019-05-10T10:32:18.805Z] ERROR: pact-node@8.2.0/118 on 054a1c2ace0f:
 Pact Binary Error: /var/lib/jenkins/jobs/FE Fragment Product/branches/pact-testing/workspace@2/node_modules/@pact-foundation/pact-node/standalone/linux-x64-1.64.1/lib/ruby/bin/ruby: line 14: Fragment: command not found

[2019-05-10T10:32:18.807Z]  WARN: pact-node@8.2.0/118 on 054a1c2ace0f: Pact exited with code 127.
[2019-05-10T10:32:18.807Z]  INFO: pact-node@8.2.0/118 on 054a1c2ace0f: Removing Pact with PID: 132
FAIL src/test/pact/selling-product-query/product.test.pact.js
● Test suite failed to run
TypeError: Cannot read property 'writePact' of undefined
7 |
8 | afterAll((done) => {
> 9 | provider.finalize().then(() => done());
| ^
10 | });
11 |
12 | afterEach(() => provider.verify());
at Pact.Object.<anonymous>.Pact.finalize (node_modules/@pact-foundation/src/httpPact.ts:148:8)
at Object.finalize (src/test/pact/pactTestWrapper.js:9:11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment