1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00
metamask-extension/app/scripts
Mark Stacey db2e461416
Add tests for retryOnEmpty middleware (#17364)
* Add tests for `retryOnEmpty` middleware

Tests have been added for the `retryOnEmpty` middleware.

This middleware is only used on the Infura network client, so the tests
that demonstrate this retry behavior are only enabled for the `infura`
provider type.

Most of the tests added were to cover cases where the retry middleware
is skipped, so they were applicable for both provider types.

Closes #17004

* Improve readability of block number tests

The test cases for passing a block number parameter have been made more
readable. Specifically, a comment has been added each time params are
built to call attention to the block parameter and what value it has,
so that it's clear whether it's larger or smaller than the current
block number.

Additionally the blocks for "less than the current block number" and
"equal to the current block number" have been combined using
`describe.each`.
2023-02-01 16:33:26 -03:30
..
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 Add tests for retryOnEmpty middleware (#17364) 2023-02-01 16:33:26 -03:30
lib Fixing/extending type definitions for later usage (#17514) 2023-02-01 11:53:21 -06: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 remove snap notifications when uninstalled (#17487) 2023-01-30 13:43:47 +01:00
metamask-controller.test.js [FLASK] snaps-monorepo@0.28.0 (#17277) 2023-01-23 20:41:04 +01:00
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