bug: combination of vm.expectRevert
and (failing) deployCode
does not work
#4589
Labels
vm.expectRevert
and (failing) deployCode
does not work
#4589
Component
Forge
Describe the feature you would like
It's currently not possible to pair a
deployCode
withvm.expectRevert
. It also doesn't work to usetestFail
in this case.We are forced to use
deployCode
to get around version constraints (our tests are solc 0.8.17 and some of our code is 0.6.12). We'd like to test some validation constraints in the constructor of one of our (old) contracts.Additional context
One workaround would be to create a mock factory contract and use
deployCode
on that one and then deploy the tested contract through that mock factory ... but that seems a bit unwieldy.The text was updated successfully, but these errors were encountered: