1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts/controllers
Zachary Belford cd2249f193
Add tests for custom JSON-RPC network client (#16337)
Previously we had written tests for `createInfuraClient`, which creates a middleware stack designed to connect to an Infura provider. These tests exercise various RPC methods that relate to the behavior that the middleware provides (mainly around caching). 

Now we need to write the same tests but for `createJsonRpcClient`, which creates a middleware stack designed to connect to a non-Infura RPC endpoint. To do this, we had to:

- Consolidate the tests for both types of RPC client into a single test file.
- Add conditions around tests or assertions in tests to account for differences in behavior between the two sets of middleware stacks.
- Relocate code in `createJsonRpcClient` which slows down `eth_estimateGas` calls just for tests so that this behavior can be disabled in the network client tests.

Eventually, as we unify the network controllers in this repo and in the core repo, we will move these tests into the core repo.

Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
2023-01-06 10:10:17 -07:00
..
ens Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
network Add tests for custom JSON-RPC network client (#16337) 2023-01-06 10:10:17 -07:00
permissions Moved subscribe and filter into network controller (#16693) 2022-12-20 10:28:09 -07:00
transactions determine tx type using normalized txparams (#17055) 2023-01-05 17:37:50 -07:00
alert.js remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
app-state.js Removing flag for EIP1559 V2 support (#16446) 2022-12-09 00:07:06 +05:30
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 fix cached detected token results (#16866) 2022-12-14 12:26:08 +05:30
detect-tokens.test.js Make certain network controller methods private (#16883) 2022-12-13 15:43:54 -03:30
incoming-transactions.js Network request in background should not start until onboarding is completed (#16773) 2022-12-02 23:29:03 +05:30
incoming-transactions.test.js Network request in background should not start until onboarding is completed (#16773) 2022-12-02 23:29:03 +05:30
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 remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
preferences.js Security and Privacy Settings Re-org (#16756) 2022-12-19 18:46:36 +01:00
preferences.test.js Make certain network controller methods private (#16883) 2022-12-13 15:43:54 -03:30
swaps.js Update quote selection for Optimism (#16998) 2022-12-21 20:59:34 +01:00
swaps.test.js Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989) 2022-09-28 20:26:01 -07:00