1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-01 21:57:06 +01:00
metamask-extension/app/scripts/controllers/network
Elliot Winkler 7e97ff2be4
Expand network controller unit test coverage (#17498)
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>
2023-02-08 13:10:04 -07:00
..
provider-api-tests Add network client tests for methods not supported by Infura (#17347) 2023-02-02 15:44:22 -03:30
createInfuraClient.js Update eth-json-rpc-infura (#15845) 2022-09-15 14:41:18 -02:30
createInfuraClient.test.js Add tests for custom JSON-RPC network client (#16337) 2023-01-06 10:10:17 -07:00
createJsonRpcClient.js Add tests for custom JSON-RPC network client (#16337) 2023-01-06 10:10:17 -07:00
createJsonRpcClient.test.js Add tests for custom JSON-RPC network client (#16337) 2023-01-06 10:10:17 -07:00
index.js Rename the network controller module (#16974) 2022-12-16 16:37:06 -03:30
network-controller.js Expand network controller unit test coverage (#17498) 2023-02-08 13:10:04 -07:00
network-controller.test.js Expand network controller unit test coverage (#17498) 2023-02-08 13:10:04 -07:00