Skip to content

Commit

Permalink
test/unit/permissions - fix promise await timing (#8410)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumavis authored Apr 24, 2020
1 parent 266d6e6 commit dcf0816
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@ describe('permissions middleware', function () {

await permController.approvePermissionsRequest(approvedReq, ACCOUNT_ARRAYS.a)

// at this point, the permission should have been granted
// wait for permission to be granted
await pendingApproval

const perms = permController.permissions.getPermissionsForDomain(ORIGINS.a)

assert.equal(
Expand All @@ -551,8 +553,6 @@ describe('permissions middleware', function () {
[CAVEATS.eth_accounts(ACCOUNT_ARRAYS.a)]
)

await pendingApproval

// we should also see the accounts on the response
assert.ok(
res.result && !res.error,
Expand Down

0 comments on commit dcf0816

Please sign in to comment.