diff --git a/src/migrating-to-v1/breaking-changes.md b/src/migrating-to-v1/breaking-changes.md index 47c258b8d..f6abe279b 100644 --- a/src/migrating-to-v1/breaking-changes.md +++ b/src/migrating-to-v1/breaking-changes.md @@ -279,7 +279,7 @@ library EmitLib { } } -// intermediate "mock" contract that calls the library function +// Intermediate "mock" contract that calls the library function // and returns the result. contract MathLibMock { function add(uint a, uint b) external returns (uint256) { diff --git a/src/migrating-to-v1/deprecated-features.md b/src/migrating-to-v1/deprecated-features.md index d550261ad..ac2bbc64e 100644 --- a/src/migrating-to-v1/deprecated-features.md +++ b/src/migrating-to-v1/deprecated-features.md @@ -1,8 +1,8 @@ ## Deprecated features -With foundry v1, we've started deprecating features that are considered anti-patterns or might be misleading and confusing for developers. Deprecated means that while you can continue using these features, it is now a discouraged practice and you should plan on migrating away from using these. +With Foundry v1, we've started deprecating features that are considered anti-patterns or might be misleading and confusing for developers. Deprecated means that while you can continue using these features, it is now a discouraged practice and you should plan on migrating away from using these. -### Removing the Invariant keyword +### Removing the `invariant` prefix The `invariant` test prefix has now been deprecated, and the new expected prefix is `statefulFuzz`. This is mainly to have more correctness on naming: Invariants can be tested with regular fuzz tests. The difference between Foundry's fuzz and invariant tests is that fuzz tests are *stateless* while invariant tests are *stateful*. This means that now writing tests in this manner is valid: @@ -49,8 +49,8 @@ contract TestFailDeprecated is Test { // Better way, without using testFail. /// The call to revert_ has been refactored and is now expected to fail /// with expectRevert() - function test_RevertIf_AlwaysReverts() public { - vm.expectRevert("This reverts); + function test_revertIf_alwaysReverts() public { + vm.expectRevert("This reverts"); // Call using `this` to increase depth this.exposed_call_Reverter(); } diff --git a/src/migrating-to-v1/migrating-to-v1.md b/src/migrating-to-v1/migrating-to-v1.md index c86fcc28e..2db136b0d 100644 --- a/src/migrating-to-v1/migrating-to-v1.md +++ b/src/migrating-to-v1/migrating-to-v1.md @@ -10,7 +10,7 @@ v1 mainly increases the strictness of several cheatcodes, and accommodating this If migration is time consuming, you can consider upgrading your local foundry installation while migrating tests, but maintaining nightly usage on CI to avoid any failures that might disrupt your workflow. -Aside from this, V1 is still the same Foundry you know. +Aside from this, v1 is still the same Foundry you know. ### I need support. Where do I go?