1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

test/unit/permissions - fix promise await timing (#8410)

This commit is contained in:
kumavis 2020-04-25 06:05:30 +08:00 committed by GitHub
parent 266d6e67fe
commit dcf08164d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(
@ -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,