-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* 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) [email protected] (#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) [email protected] (#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
.requestUserApproval
in permissions controller tests