File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
backend-api/src/__tests__/templates/api Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 11import { Verifier } from '@pact-foundation/pact' ;
2+ import * as path from 'path' ;
23
34describe ( 'Pact Verification' , ( ) => {
45 it ( 'should validate the expectations of the consumer' , async ( ) => {
@@ -9,18 +10,24 @@ describe('Pact Verification', () => {
910 latest : true ,
1011 } ,
1112 ] ,
13+ pactUrls : [
14+ path . resolve (
15+ __dirname ,
16+ '../../backend-client/pacts/TemplateClient-TemplateService.json'
17+ ) ,
18+ ] ,
1219 providerBaseUrl : 'http://localhost:8080' ,
13- pactBrokerUrl : process . env . PACT_BROKER_URL || 'http://127.0.0.1:8000' ,
20+ pactBrokerUrl :
21+ process . env . PACT_BROKER_BASE_URL || 'http://127.0.0.1:8000' ,
1422 pactBrokerUsername : process . env . PACT_BROKER_USERNAME || 'pact_workshop' ,
1523 pactBrokerPassword : process . env . PACT_BROKER_PASSWORD || 'pact_workshop' ,
24+ // pactBrokerToken: process.env.PACT_BROKER_TOKEN,
1625 publishVerificationResult : true ,
1726 providerVersion : '1.0.0' ,
1827 } ;
1928
2029 const verifier = new Verifier ( opts ) ;
2130
2231 await verifier . verifyProvider ( ) ;
23-
24- throw error ;
2532 } ) ;
2633} ) ;
Original file line number Diff line number Diff line change 1- # Contracts
1+ # pacts
22This folder comntains the consumer cretaed contracts (pacts) these are created from lambdas/backend-client/src/__ tests__ /api.pact.spec.ts
33
4-
5-
64# Verifier
7-
8- This runs against the api /lambdas/backend-api/src/__ tests__ /templates/api/api.pact.test.ts.
5+ This is a unit test which runs against
6+ This runs against the api /lambdas/backend-api/src/__ tests__ /templates/api/api.pact.test.ts and verifies the pacts generated from the client .
97
108
119# Bi-directional contract testing
You can’t perform that action at this time.
0 commit comments