mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-28 23:06:37 +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> |
||
---|---|---|
.. | ||
provider-api-tests | ||
createInfuraClient.js | ||
createInfuraClient.test.js | ||
createJsonRpcClient.js | ||
createJsonRpcClient.test.js | ||
index.js | ||
network-controller.js | ||
network-controller.test.js |