Browse Source

Rewrite assertion chains (#5867)

Co-authored-by: fifalodm <172500006+fifalodm@users.noreply.github.com>
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Eric 1 month ago
parent
commit
a40af037b1
2 changed files with 3 additions and 3 deletions
  1. 2 2
      test/account/AccountMultiSigner.test.js
  2. 1 1
      test/token/ERC20/ERC20.behavior.js

+ 2 - 2
test/account/AccountMultiSigner.test.js

@@ -177,11 +177,11 @@ describe('AccountMultiSigner', function () {
 
       // Unreachable threshold reverts
       await expect(this.mock.$_setThreshold(3))
-        .to.revertedWithCustomError(this.mock, 'MultiSignerERC7913UnreachableThreshold')
+        .to.be.revertedWithCustomError(this.mock, 'MultiSignerERC7913UnreachableThreshold')
         .withArgs(2, 3);
 
       // Zero threshold reverts
-      await expect(this.mock.$_setThreshold(0)).to.revertedWithCustomError(
+      await expect(this.mock.$_setThreshold(0)).to.be.revertedWithCustomError(
         this.mock,
         'MultiSignerERC7913ZeroThreshold',
       );

+ 1 - 1
test/token/ERC20/ERC20.behavior.js

@@ -78,7 +78,7 @@ function shouldBehaveLikeERC20(initialSupply, opts = {}) {
             const value = initialSupply;
             await this.token.connect(this.holder).transfer(this.other, 1n);
             await expect(this.token.connect(this.recipient).transferFrom(this.holder, this.other, value))
-              .to.revertedWithCustomError(this.token, 'ERC20InsufficientBalance')
+              .to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance')
               .withArgs(this.holder, value - 1n, value);
           });
         });