1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00
metamask-extension/test/jest
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
..
background.js MV3: add retry logic to actions (#15337) 2022-09-05 20:25:34 +05:30
constants.js Add a new fiat onboarding option via MoonPay (#13934) 2022-03-21 10:26:52 +01:00
env.js Adding static icon names to test env file (#16078) 2022-11-18 22:28:38 +05:30
index.js Enable and stabilise e2e tests for Swaps, add debouncing (#16326) 2022-11-03 14:54:49 +01:00
mock-store.js Remove a notification for falling back from STX to regular swaps (#17374) 2023-01-25 20:01:10 +01:00
mocks.js Deprecate snake case from feature flags (#15994) 2022-09-29 11:03:38 -05:00
rendering.js remove the ui/app and ui/lib folders (#10911) 2021-04-28 14:53:59 -05:00
setup.js Expand network controller unit test coverage (#17498) 2023-02-08 13:10:04 -07:00