1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/test/e2e
Mark Stacey 01f1f403ce Add timeout to wait-until-called (#9996)
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.
2020-12-09 12:17:46 -03:30
..
fixtures
mock-3box
send-eth-with-private-key-test
tests
webdriver
address-book.spec.js
benchmark.js
ethereum-on.spec.js
fixture-server.js
from-import-ui.spec.js
ganache.js
helpers.js
incremental-security.spec.js
metamask-responsive-ui.spec.js
metamask-ui.spec.js
metrics.spec.js
permissions.spec.js
run-all.sh
send-edit.spec.js
signature-request.spec.js
threebox.spec.js