1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00
metamask-extension/app/scripts/controllers
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
..
ens Fix/use etherjs specific imports (#15461) 2023-01-24 08:10:36 -06:00
network Expand network controller unit test coverage (#17498) 2023-02-08 13:10:04 -07:00
permissions Moved subscribe and filter into network controller (#16693) 2022-12-20 10:28:09 -07:00
transactions 🐛 Calldata validation (#17326) 2023-02-01 16:34:55 -06:00
alert.js feature: convert level 32 files to typescript (#17390) 2023-01-27 18:28:03 +00:00
app-state.js Adding browser outdated notification (#17027) 2023-02-02 13:56:41 -05:00
app-state.test.js Adding browser outdated notification (#17027) 2023-02-02 13:56:41 -05:00
backup.js Fix 3box replacement for MV3 (#15851) 2022-09-29 07:34:20 +04:00
backup.test.js 3box Replacement (#15243) 2022-08-09 19:36:32 +01:00
cached-balances.js remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
cached-balances.test.js Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989) 2022-09-28 20:26:01 -07:00
detect-tokens.js Convert Transaction constants to typescript (#17149) 2023-01-18 08:47:29 -06:00
detect-tokens.test.js Relocate conversion utils to shared/modules/conversion.utils.js (#17319) 2023-01-20 11:04:37 -06:00
incoming-transactions.js Relocate conversion utils to shared/modules/conversion.utils.js (#17319) 2023-01-20 11:04:37 -06:00
incoming-transactions.test.js Convert Transaction constants to typescript (#17149) 2023-01-18 08:47:29 -06:00
metametrics.js add an extra identifier on anonymized duplicate events (#17080) 2023-01-05 08:49:55 -06:00
metametrics.test.js add an extra identifier on anonymized duplicate events (#17080) 2023-01-05 08:49:55 -06:00
onboarding.js Use async/await instead of Promise.resolve (#16221) 2023-01-20 14:20:18 -06:00
preferences.js Disable eth_sign by default, allow users to toggle it back on (#17308) 2023-02-06 13:17:50 -03:30
preferences.test.js Toggle option to enable/disable balance and Token rate checking for using third-party API (#16772) 2023-01-17 10:23:04 -05:00
swaps.js feature: convert level 32 files to typescript (#17390) 2023-01-27 18:28:03 +00:00
swaps.test.js feature: convert level 32 files to typescript (#17390) 2023-01-27 18:28:03 +00:00