test: deploy "foo" in "setUp"

This commit is contained in:
Paul Razvan Berg 2023-05-26 11:51:58 +03:00
parent 11cc8b4fa1
commit 4d688c3d92
No known key found for this signature in database
GPG Key ID: 94DB130BAB397DED
1 changed files with 4 additions and 4 deletions

View File

@ -14,12 +14,12 @@ interface IERC20 {
/// @dev If this is your first time with Forge, read this tutorial in the Foundry Book:
/// https://book.getfoundry.sh/forge/writing-tests
contract FooTest is PRBTest, StdCheats {
// Instantiate the contract-under-test
Foo internal foo = new Foo();
Foo internal foo;
/// @dev An optional function invoked before each test case is run.
/// @dev A function invoked before each test case is run.
function setUp() public virtual {
// solhint-disable-previous-line no-empty-blocks
// Instantiate the contract-under-test.
foo = new Foo();
}
/// @dev Basic test. Run it with `forge test -vvv` to see the console log.