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
At the moment, Kontrol has a strict requirement on the vm.prank and vm.expectRevert ordering and is not mirroring Foundry behavior. Kontrol reports the first test as failing but Foundry doesn't:
function test_SetNumber_reverts() public {
vm.expectRevert();
vm.prank(address(0x11));
counter.setNumberOwner(1);
}
function test_SetNumber_reverts_reordered() public {
vm.prank(address(0x11));
vm.expectRevert();
counter.setNumberOwner(1);
}
A client also mentioned that sometimes teams will put an external call inside the expect revert to get some state so having the prank afterward avoids pranking on the view call.
The text was updated successfully, but these errors were encountered:
At the moment, Kontrol has a strict requirement on the
vm.prank
andvm.expectRevert
ordering and is not mirroring Foundry behavior. Kontrol reports the first test as failing but Foundry doesn't:A client also mentioned that sometimes teams will put an external call inside the expect revert to get some state so having the prank afterward avoids pranking on the view call.
The text was updated successfully, but these errors were encountered: