isIsolateMode
Signature
Section titled “Signature”function isIsolateMode() external view returns (bool result);Description
Section titled “Description”Returns whether the running Solidity test is executed in isolation mode, which you enable by setting isolate to true in the Solidity tests configuration.
In isolation mode, every top-level call runs as a separate transaction, which changes gas accounting and when state is committed. Use this cheatcode to adapt a test, or to skip it, depending on the mode it runs in.
Examples
Section titled “Examples”function testGasOfTransfer() public { if (!vm.isIsolateMode()) { vm.skip(true, "gas is only exact in isolation mode"); }
// ...}