mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
7e97ff2be4
The network controller has some tests, but they are incomplete and don't follow our latest best practices for writing unit tests. This commit greatly increases the amount of test coverage for the API that we want to retain in NetworkController, in particular the seemingly myriad paths that the code takes starting from `initializeProvider`, `resetConnection`, `setRpcTarget`, `setProviderType`, `rollbackToPreviousProvider`, and `lookupNetwork`. There were a couple of pieces of logic I noted which don't seem to have any effect due to being redundant or unreachable, but they also don't make our lives more difficult, either, so I opted to leave them in. Co-authored-by: Mark Stacey <markjstacey@gmail.com> Co-authored-by: Zachary Belford <belfordz66@gmail.com> |
||
---|---|---|
.. | ||
data | ||
e2e | ||
helpers | ||
jest | ||
lib | ||
mocks | ||
stub | ||
unit-global | ||
env.js | ||
merge-coverage.js | ||
run-unit-tests.js | ||
setup.js |