mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-27 04:46:10 +01:00
59aab93560
Unit tests have been added to the incoming transactions controller to ensure that block updates are correctly resulting in state updates when incoming transactions are enabled. All other events that trigger state updates are tested as well. The tests were written to be minimally dependent upon implementation details of the controller itself. `nock` was used to mock the API response from Etherscan. Each event is triggered asynchronously by `sinon`, as in production they are likely only triggered asynchronously. This was extracted from #9583 This PR includes a new `wait-until-called` module meant to help with writing asynchronous tests. It allows you to wait until a stub has been called. |
||
---|---|---|
.. | ||
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 |