1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 11:28:51 +01:00
metamask-extension/app/scripts/controllers
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
..
ens Fix/use etherjs specific imports (#15461) 2023-01-24 08:10:36 -06:00
network Add tests for retryOnEmpty middleware (#17364) 2023-02-01 16:33:26 -03:30
permissions
transactions Fixing/extending type definitions for later usage (#17514) 2023-02-01 11:53:21 -06:00
alert.js feature: convert level 32 files to typescript (#17390) 2023-01-27 18:28:03 +00:00
app-state.js Fixing/extending type definitions for later usage (#17514) 2023-02-01 11:53:21 -06:00
backup.js
backup.test.js
cached-balances.js
cached-balances.test.js
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
metametrics.test.js
onboarding.js Use async/await instead of Promise.resolve (#16221) 2023-01-20 14:20:18 -06:00
preferences.js Move THEME_TYPE to new preferences.ts file (#17515) 2023-01-31 17:49:00 -06:00
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