User Tools

Site Tools


pact_contract_test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pact_contract_test [2026/01/05 08:20] – [Overview] pradnyapact_contract_test [2026/01/05 08:27] (current) – [Overview] pradnya
Line 80: Line 80:
 </code> </code>
  
-Helper Setup File+**Helper Setup File**
  
 <code> <code>
Line 86: Line 86:
  
 </code> </code>
 +
 +Create pact
  <font 9px/inherit;;inherit;;inherit>ts</font>  <font 9px/inherit;;inherit;;inherit>ts</font>
 +
 +<code>
 +import path from "path";
 +import { PactV3 } from "@pact-foundation/pact";
 +
 +export function createPact(providerName: string) {
 +  return new PactV3({
 +    consumer: "BFF-Service",
 +    provider: providerName,
 +    dir: path.resolve(process.cwd(), "pacts"),
 +    logLevel: "INFO"
 +  });
 +}
 +
 +</code>
 +
 +**login.pact.test.ts** <font 9px/inherit;;inherit;;inherit>ts</font>
  
 <code> <code>
Line 132: Line 151:
  
 </code> </code>
 +
 +
 +
 +
 ====== Generated Pact Files ====== ====== Generated Pact Files ======
  
 Pacts output to: Pacts output to:
  
-<code>/pacts \\ +<code> 
- ┗ BFF-Service-Auth-Service.json \\+/pacts 
 + ┗ BFF-Service-Auth-Service.json
  
 </code> </code>
- 
- 
  
  
pact_contract_test.1767601218.txt.gz · Last modified: by pradnya