Summary
The negative tests in packages/plugin-hardhat/test/solidity/Upgrades.t.sol (e.g., testValidateImplementation, testValidateLayout, testValidateLayoutUpgradesFrom, testValidateNamespaced, testValidateNamespacedUpgradesFrom, testValidateNamespacedNoReference) currently use bare catch {} blocks that accept any revert — including unrelated regressions — without verifying the revert reason.
Proposed Fix
Once stable error message substrings from the plugin are curated, replace each bare catch {} with a specific substring assertion using the already-imported StringFinder utility, e.g.:
} catch (bytes memory err) {
assertTrue(string(err).contains("expected substring here"));
}
References
/cc @ericglau
Summary
The negative tests in
packages/plugin-hardhat/test/solidity/Upgrades.t.sol(e.g.,testValidateImplementation,testValidateLayout,testValidateLayoutUpgradesFrom,testValidateNamespaced,testValidateNamespacedUpgradesFrom,testValidateNamespacedNoReference) currently use barecatch {}blocks that accept any revert — including unrelated regressions — without verifying the revert reason.Proposed Fix
Once stable error message substrings from the plugin are curated, replace each bare
catch {}with a specific substring assertion using the already-importedStringFinderutility, e.g.:References
/cc @ericglau