1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00
metamask-extension/test/lib
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
..
migrations Add prettier-plugin-sort-json (#9450) 2020-09-23 12:21:42 -02:30
createTxMeta.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
mock-encryptor.js Disallow all anonymous default export, aside from CSF and migrations (#8535) 2020-05-18 21:18:11 -02:30
render-helpers.js Remove mountWithStore enzyme component wrapper (#9309) 2020-08-26 15:55:24 -07:00
wait-until-called.js Add unit tests for incoming transaction block events (#9755) 2020-10-30 11:47:36 -02:30