Robustify permissions controller requestUserApproval tests#9064
Robustify permissions controller requestUserApproval tests#9064
Conversation
b120978 to
0690178
Compare
Builds ready [0690178]
Page Load Metrics (638 ± 20 ms)
|
Isn't all of this the case with |
|
@Gudahtt yeah, you're right: https://jsfiddle.net/k8ch1yqb/ The only time the entire function body, and any Promise executors, won't be eagerly executed is, obviously, if The important thing about that function is that it's either So, except that, the form of I'll update the PR description. Should we leave the |
|
I think the original is subtly better anyway in the case where an error is thrown, because we'll get an async stack trace (on Chrome at least)? Not entirely sure. It's at least probably not worse. |
Builds ready [518a22c]
Page Load Metrics (642 ± 21 ms)
|
* origin/develop: (582 commits) Use async/await for seedPhraseVerifier.verifyAccounts (#9100) Use async/await for getRestrictedMethods (#9099) Update dependencies (#9105) update email us to contact us (#9104) Improve source maps (#9101) Update font family globally (#9073) rpc-cap@3.1.0 (#9103) Use environment variable for production Sentry DSN (#9097) Only log error on first occurrence of missing substitution (#9096) Use mixins for typography instead of placeholder selectors (#9072) Update css folder structure (#9071) Disable Sentry in development (#9095) Use environment variable for MetaMetrics project ID (#9094) Use development metametrics project during tests (#9093) json-rpc-engine@5.2.0 (#9091) fixup! call initializeProvider where necessary call initializeProvider where necessary Add euclid fontface (#9018) fix timing-reliant network controller test Robustify permissions controller requestUserApproval tests (#9064) ...
* convert requestUserApproval mock to wrapper
This PR removes some reliance on timing artifacts in permissions controller tests that rely on
requestUserApproval.requestUserApprovalin permissions controller tests