Skip to content

Commit

Permalink
BAU Fix flaky test
Browse files Browse the repository at this point in the history
The `before` wasn't waiting for a promise to resolve. Return the promise
so it is awaited before the test is run.
  • Loading branch information
stephencdaly committed Sep 14, 2023
1 parent 36f7e3b commit 4557862
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('connector client - get single charge', () => {
const response = chargeFixture.validGetChargeResponse(opts)

before(() => {
provider.addInteraction(
return provider.addInteraction(
new PactInteractionBuilder(`${ACCOUNTS_RESOURCE}/${existingGatewayAccountId}/charges/${existingChargeExternalId}`)
.withUponReceiving('a valid get charge request')
.withState(defaultState)
Expand Down

0 comments on commit 4557862

Please sign in to comment.