Skip to content

Commit

Permalink
fix: make 'dir' optional in PactV3 interface and default to ./pacts dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Jul 22, 2022
1 parent 98073fb commit 0b12160
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/v3/pact.ts
Expand Up @@ -219,7 +219,7 @@ export class PactV3 {

private cleanup(success: boolean, server: V3MockServer) {
if (success) {
this.pact.writePactFile(this.opts.dir);
this.pact.writePactFile(this.opts.dir || './pacts');
}
this.pact.cleanupMockServer(server.port);
this.setup();
Expand Down
2 changes: 1 addition & 1 deletion src/v3/types.ts
Expand Up @@ -15,7 +15,7 @@ export interface PactV3Options {
/**
* Directory to write the pact file to
*/
dir: string;
dir?: string;
/**
* Consumer name
*/
Expand Down

0 comments on commit 0b12160

Please sign in to comment.