1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
metamask-extension/test/unit/app/controllers
Mark Stacey 59aab93560
Add unit tests for incoming transaction block events (#9755)
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.
2020-10-30 11:47:36 -02:30
..
network Merge pull request from GHSA-c2xw-px2x-pr65 2020-10-06 15:27:02 -02:30
permissions Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
transactions Refactor background Segment usage (#9509) 2020-10-08 09:41:23 -07:00
cached-balances-test.js Fix no-empty-function issues (#9216) 2020-08-14 09:17:02 -02:30
detect-tokens-test.js Use Infura v3 API (#9368) 2020-09-10 13:46:00 -02:30
ens-controller-test.js Fix import/no-extraneous-dependencies issues (#9232) 2020-08-14 17:34:56 -02:30
incoming-transactions-test.js Add unit tests for incoming transaction block events (#9755) 2020-10-30 11:47:36 -02:30
metamask-controller-test.js Remove localhost provider type (#9551) 2020-10-12 12:05:40 -07:00
preferences-controller-test.js Remove localhost provider type (#9551) 2020-10-12 12:05:40 -07:00
swaps-test.js Fix swaps when initial network not Mainnet (#9745) 2020-10-28 16:17:32 -02:30
token-rates-controller.js Fix import/order issues (#9239) 2020-08-18 16:48:25 -02:30