Skip to main content

Crate foundry_test_utils

Crate foundry_test_utils 

Source
Expand description

ยงfoundry-test-utils

Internal Foundry testing utilities.

Re-exportsยง

pub use foundry_compilers;
pub use self;

Modulesยง

etherscan
Etherscan utilities for tests.
ext ๐Ÿ”’
fd_lock
File locking utilities.
filter ๐Ÿ”’
macros ๐Ÿ”’
prj ๐Ÿ”’
rpc
RPC testing utilities.
script ๐Ÿ”’
ui_runner
util

Macrosยง

assert_data_eq
Check if a value is the same as an expected value
file
Declare an expected value for an assert from a file
str
Declare an expected value from within Rust source
test_debug
test_trace

Structsยง

ExtTester
External test builder
Filter
ScriptTester
A helper struct to test forge script scenarios
TestCommand
A simple wrapper around a Command with some conveniences.
TestProject
TestProject represents a temporary project to run tests against.

Enumsยง

ScriptOutcome
Various forge script results

Functionsยง

cargo_profile_dir
Returns the Cargo profile directory (target/<profile>) for the currently running test executable.
env_filter ๐Ÿ”’
init_tracing
Initializes tracing for tests.
test_debug
test_trace

Attribute Macrosยง

casttest
Same as forgetest, but cmd is a cast command.
forgetest
Defines a Forge integration test.
forgetest_init
Same as forgetest, but initializes the project with forge init first.