alchemyplatform / rundler

An ERC-4337 Bundler in Rust
GNU Lesser General Public License v3.0
286 stars 43 forks source link

[alloy] Add unit tests to alloy providers where applicable #789

Closed dancoombs closed 1 month ago

dancoombs commented 2 months ago

Describe the feature The alloy provider module contains zero unit tests. Unit tests are difficult as the majority of the logic requires making network calls.

We should evaluate the module and add unit tests where applicable.

We should be careful not to over re-factor the code in order to make it unit testable. I'd prefer easily readable, modifiable, code vs. code with extra interfaces introduced just for testing. We can rely on integration testing to catch some of these cases.

I'd also like to avoid spinning up anvil instances just for unit tests, as that feels very heavy handed.

I'm okay if this ticket is closed with a no-op after evaluation.

dancoombs commented 1 month ago

See #820 for a few examples of where unit tests would be helpful

andysim3d commented 1 month ago

826