Foundry FundMe: Updated foundry test revert #4981
Replies: 4 comments 3 replies
-
|
Thanks for the heads-up, buddy. |
Beta Was this translation helpful? Give feedback.
-
|
hello i been struggling to deploy this fundme.t.sol // SPDX-LICENCE-IDENTIFIER: MIT pragma solidity ^0.8.18; import {Test, console} from "forge-std/Test.sol"; contract FundMeTest is Test { } every time i run forge test -vv i kept seeing this /projects/foundry-f26/foundry-fund-me-f26$ forge test -vv Ran 1 test for test/FundMe.t.sol:FundMeTest Ran 1 test suite in 224.37ms (8.65ms CPU time): 0 tests passed, 1 failed, 0 skipped (1 total tests) Failing tests: Encountered a total of 1 failing tests, 0 tests succeeded Tip: Run pls can you help me look at it too |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for ur relpl @EngrPips this is my full test suit: // SPDX-LICENCE-IDENTIFIER: MIT pragma solidity ^0.8.18; import {Test, console} from "forge-std/Test.sol"; contract FundMeTest is Test { } } if when i run forge test -vvvv this is the output: zayyad@zayyad:~/projects/foundry-f26/foundry-fund-me-f26$ forge test -vvvv Warning (2072): Unused local variable. Warning (2018): Function state mutability can be restricted to view Ran 1 test for test/FundMe.t.sol:FundMeTest [2745] FundMeTest::testMinimumIsFive() Backtrace: Suite result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 25.86ms (4.70ms CPU time) Ran 1 test suite in 289.17ms (25.86ms CPU time): 0 tests passed, 1 failed, 0 skipped (1 total tests) Failing tests: Encountered a total of 1 failing tests, 0 tests succeeded Tip: Run |
Beta Was this translation helpful? Give feedback.
-
|
What is on line 12, column 9 of your file? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If you're getting an error while trying to test a revert in Foundry, it’s likely because foundry doesn't support the
testFails... naming convention anymore. Revert tests must now explicitly follow thetest_RevertIf_...ortest_RevertWhen_...naming conventionBeta Was this translation helpful? Give feedback.
All reactions