You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When coding a test harness for live contracts, it is not possible to know in advance the state the the smart contracts will be in. Therefore, some tests will make sense, and others will not.
For example, we might have a set of tests that make sense on a given uninitialized contract, but once the contract is initialized it would make more sense to skip those tests and move on to the next ones in the same file.
There is an easy workaround in making the test return if a certain condition is met, with a console log to say that the test was skipped. However, in the output it still comes as PASS and that might lead to confusion.
I would very much prefer if the test would show as SKIP, and maybe even in the summary at the end ("67 passed, 32 skipped, 0 failed", for example).
Additional context
In this test file, this test only makes sense in the contract is in an EJECTED state after the setup function.
The text was updated successfully, but these errors were encountered:
Agreed this would be useful, I think vm.skip(bool) or vm.skipTest(bool) is the best UX here. Also a duplicate of #1123 if you want to move the discussion there
Component
Forge
Describe the feature you would like
When coding a test harness for live contracts, it is not possible to know in advance the state the the smart contracts will be in. Therefore, some tests will make sense, and others will not.
For example, we might have a set of tests that make sense on a given uninitialized contract, but once the contract is initialized it would make more sense to skip those tests and move on to the next ones in the same file.
There is an easy workaround in making the test return if a certain condition is met, with a console log to say that the test was skipped. However, in the output it still comes as PASS and that might lead to confusion.
I would very much prefer if the test would show as SKIP, and maybe even in the summary at the end ("67 passed, 32 skipped, 0 failed", for example).
Additional context
In this test file, this test only makes sense in the contract is in an EJECTED state after the setup function.
The text was updated successfully, but these errors were encountered: