Skip to content

Commit

Permalink
fix(verifier): properly wrap pact-node q promise in verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Jan 6, 2018
1 parent 3703e81 commit affca89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dsl/verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { Promise } from "es6-promise";

export class Verifier {
public verifyProvider(opts: VerifierOptions): Promise<string> {
return pact.verifyPacts(opts)
.then((value: string) => Promise.resolve(value), (error: any) => Promise.reject(error));
return new Promise((resolve, reject) => {
pact.verifyPacts(opts)
.then((value: string) => resolve(value), (error: any) => reject(error));
});
}
}

0 comments on commit affca89

Please sign in to comment.