-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels