mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
01f1f403ce
The `waitUntilCalled` utility now has a timeout. It will now throw an error if the stub is not called enough times, rather than blocking forever. The return type had to be changed to a function, so that we could throw when the timeout is triggered. I tried returning an error that rejected first, but if you don't handle the error synchronously Node.js will consider it to be an unhandled Promise rejected (even if it _is_ handled later on). I worked around this by resolving in the timeout case as well, so that there is never a "deferred" Promise exception in the timeout case. The returned function re-throws the error if it's given. That way there is never any unhandled Promise rejection. |
||
---|---|---|
.. | ||
controllers | ||
account-import-strategies.spec.js | ||
buy-eth-url.spec.js | ||
cleanErrorStack.spec.js | ||
ComposableObservableStore.js | ||
fetch-with-timeout.test.js | ||
message-manager-test.js | ||
nodeify-test.js | ||
personal-message-manager-test.js | ||
seed-phrase-verifier-test.js | ||
typed-message-manager.spec.js | ||
util-test.js |