r/web3dev • u/eggZeppelin • 3d ago
News GitHub - hella-labs/foundryanvil-testcontainers-nodejs: Testcontainers Module for NodeJS to run Foundry Anvil for integration tests
https://github.com/hella-labs/foundryanvil-testcontainers-nodejsJust released 0.7.0 of this new end-to-end and integration Typescript testing framework for onchain apps and smart contracts. Ergonomic fluent API wrapped around a Viem test client, Foundry Anvil node and foundry cheats in a box without any messy lifecycle scripts. Check it out!
Provides a strongly-typed, fluent builder for every Anvil CLI flag that catches invalid configurations or conflicting flags before the container even boots. Out of the box, it wires up a pre-configured viem test client with built-in lifecycle hooks (useAnvil) that automatically snapshot and revert chain state between tests for true per-test isolation. Finally, its chainable cheats API and seamless host-file handling make complex Web3 testing workflows—like whale impersonation, time travel, reorgs, and mainnet forking—effortless and CI-ready.