1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
metamask-extension/app/scripts
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
..
account-import-strategies Use async/await instead of Promise.resolve (#16221) 2023-01-20 14:20:18 -06:00
constants Convert app/scripts/constants -> Typescript (#17327) 2023-01-20 13:33:01 -07:00
controllers Expand network controller unit test coverage (#17498) 2023-02-08 13:10:04 -07:00
lib Detect and track UI customizations on Personal Sign Requests (#16222) 2023-02-08 22:16:17 +07:00
migrations Move subject type enum to @metamask/subject-metadata-controller (#16431) 2023-01-24 16:03:01 +01:00
platforms Convert Transaction constants to typescript (#17149) 2023-01-18 08:47:29 -06:00
app-init.js Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
background.js Restore support for Chromium v78 (#17251) 2023-01-23 12:36:48 -03:30
contentscript.js Handle extension unloaded and reloaded error: "Extension context invalidated" during dapp use for chromium browsers (#16306) 2022-12-12 19:24:12 +07:00
detect-multiple-instances.js Warn about multiple MetaMask instances running (#13836) 2022-04-27 20:14:10 +02:00
detect-multiple-instances.test.js Warn about multiple MetaMask instances running (#13836) 2022-04-27 20:14:10 +02:00
disable-console.js Update Eslint and deps (#15293) 2022-07-26 13:10:51 -05:00
first-time-state.js remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
init-globals.js MV3: fix injection of applyLavamoat variable in service worker (#14920) 2022-06-18 12:40:30 +05:30
inpage.js MV3: contentscript.js - re-activate streams when Service Worker terminates and then resets (#15494) 2022-09-13 14:20:08 -07:00
lockdown-more.js Activate LavaMoat scuttling security feature (#17276) 2023-01-24 19:00:35 +02:00
lockdown-run.js lockdown - breakout making globalThis properties non-writable (#12258) 2021-10-01 08:53:12 -10:00
metamask-controller.actions.test.js Security provider check (OpenSea) (#16584) 2023-01-23 20:02:01 +05:30
metamask-controller.js Update json-rpc-middleware-stream from v2 to v4 (#17588) 2023-02-08 11:15:00 -03:30
metamask-controller.test.js Disable eth_sign by default, allow users to toggle it back on (#17308) 2023-02-06 13:17:50 -03:30
sentry-install.js refactor sentryHooks object (#16435) 2022-11-09 19:28:32 +00:00
ui.js scripts/ui: add tabs.query promise error handler (#16915) 2022-12-14 01:21:32 +07:00
use-snow.js Integrating snow into metamask (#15580) 2022-11-24 02:36:19 +02:00