Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Update pact lib to v10.0.0-beta.54 #961

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"@babel/polyfill": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@babel/runtime": "^7.4.4",
"@pact-foundation/pact": "10.0.0-beta.36",
"@pact-foundation/pact": "10.0.0-beta.54",
"babel-jest": "^26.6.3",
"babel-loader": "^8.0.5",
"chai": "^4.2.0",
Expand Down
26 changes: 11 additions & 15 deletions tests/providerTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const delay = (delayTime) => {
}

describe('provider testing', () => {
const { VerifierV3 } = require('@pact-foundation/pact/v3')
const { Verifier } = require('@pact-foundation/pact')
const chai = require('chai')
const chaiAsPromised = require('chai-as-promised')
const path = require('path')
Expand Down Expand Up @@ -98,8 +98,8 @@ describe('provider testing', () => {

const defaultOpts = {
providerBaseUrl,
disableSSLVerification: true,
callbackTimeout: 10000
disableSslVerification: true,
timeout: 10000
}
if (isRunningOnCI()) {
defaultOpts.pactBrokerUrl = 'https://jankaritech.pactflow.io'
Expand Down Expand Up @@ -414,7 +414,7 @@ describe('provider testing', () => {
)]
}

return new VerifierV3(opts).verifyProvider().then(output => {
return new Verifier(opts).verifyProvider().then(output => {
console.log('Pact Verification Complete!')
console.log('Result:', output)
}).catch(function () {
Expand All @@ -431,7 +431,7 @@ describe('provider testing', () => {
)]
}

return new VerifierV3(opts).verifyProvider().then(output => {
return new Verifier(opts).verifyProvider().then(output => {
console.log('Pact Verification Complete!')
console.log('Result:', output)
}).catch(function () {
Expand All @@ -442,14 +442,13 @@ describe('provider testing', () => {
it('verifies the contract pending on oC10', () => {
const opts = defaultOpts
opts.provider = 'oc-server-pendingOn-oc10'
opts.enablePending = true
if (!isRunningOnCI()) {
opts.pactUrls = [path.resolve(
process.cwd(), 'tests', 'pacts', 'owncloud-sdk-oc-server-pendingOn-oc10.json'
)]
}

return new VerifierV3(opts).verifyProvider().then(output => {
return new Verifier(opts).verifyProvider().then(output => {
console.log('Pact Verification Complete!')
console.log('Result:', output)
}).catch(function () {
Expand All @@ -460,13 +459,12 @@ describe('provider testing', () => {
it('verifies the contract pending on oC10 & ocis', () => {
const opts = defaultOpts
opts.provider = 'oc-server-pendingOn-oc10-ocis'
opts.enablePending = true
if (!isRunningOnCI()) {
opts.pactUrls = [path.resolve(
process.cwd(), 'tests', 'pacts', 'owncloud-sdk-oc-server-pendingOn-oc10-ocis.json'
)]
}
return new VerifierV3(opts).verifyProvider().then(output => {
return new Verifier(opts).verifyProvider().then(output => {
console.log('Pact Verification Complete!')
console.log('Result:', output)
}).catch(function () {
Expand All @@ -485,7 +483,7 @@ describe('provider testing', () => {
)]
}

return new VerifierV3(opts).verifyProvider().then(output => {
return new Verifier(opts).verifyProvider().then(output => {
console.log('Pact Verification Complete!')
console.log('Result:', output)
}).catch(function () {
Expand All @@ -502,7 +500,7 @@ describe('provider testing', () => {
)]
}

return new VerifierV3(opts).verifyProvider().then(output => {
return new Verifier(opts).verifyProvider().then(output => {
console.log('Pact Verification Complete!')
console.log('Result:', output)
}).catch(function () {
Expand All @@ -513,14 +511,13 @@ describe('provider testing', () => {
it('verifies the contract pending on ocis', () => {
const opts = defaultOpts
opts.provider = 'oc-server-pendingOn-ocis'
opts.enablePending = true
if (!isRunningOnCI()) {
opts.pactUrls = [path.resolve(
process.cwd(), 'tests', 'pacts', 'owncloud-sdk-oc-server-pendingOn-ocis.json'
)]
}

return new VerifierV3(opts).verifyProvider().then(output => {
return new Verifier(opts).verifyProvider().then(output => {
console.log('Pact Verification Complete!')
console.log('Result:', output)
}).catch(function () {
Expand All @@ -531,13 +528,12 @@ describe('provider testing', () => {
it('verifies the contract pending on oC10 & ocis', () => {
const opts = defaultOpts
opts.provider = 'oc-server-pendingOn-oc10-ocis'
opts.enablePending = true
if (!isRunningOnCI()) {
opts.pactUrls = [path.resolve(
process.cwd(), 'tests', 'pacts', 'owncloud-sdk-oc-server-pendingOn-oc10-ocis.json'
)]
}
return new VerifierV3(opts).verifyProvider().then(output => {
return new Verifier(opts).verifyProvider().then(output => {
console.log('Pact Verification Complete!')
console.log('Result:', output)
}).catch(function () {
Expand Down
Loading