Skip to content

Commit

Permalink
Fix grammar error in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed May 10, 2022
1 parent f0c8df3 commit 0ac4e1e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function supportRevertedWith(Assertion: Chai.AssertionStatic) {
this.assert(
decodedReturnData.reason === expectedReason,
`Expected transaction to be reverted with reason '${expectedReason}', but it reverted with reason '${decodedReturnData.reason}'`,
`Expected transaction NOT to be reverted with reason '${expectedReason}', but it did`
`Expected transaction NOT to be reverted with reason '${expectedReason}', but it was`
);
} else if (decodedReturnData.kind === "Panic") {
this.assert(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function supportRevertedWithCustomError(
this.assert(
true,
null,
`Expected transaction NOT to be reverted with custom error '${expectedCustomErrorName}', but it did`
`Expected transaction NOT to be reverted with custom error '${expectedCustomErrorName}', but it was`
);
} else {
// try to decode the actual custom error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function supportRevertedWithPanic(Assertion: Chai.AssertionStatic) {
`Expected transaction to be reverted with ${formattedPanicCode}, but it reverted with panic code ${decodedReturnData.code.toHexString()} (${
decodedReturnData.description
})`,
`Expected transaction NOT to be reverted with ${formattedPanicCode}, but it did`
`Expected transaction NOT to be reverted with ${formattedPanicCode}, but it was`
);
} else {
this.assert(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function supportRevertedWithoutReasonString(
this.assert(
true,
null,
"Expected transaction NOT to be reverted without a reason string, but it did"
"Expected transaction NOT to be reverted without a reason string, but it was"
);
} else if (decodedReturnData.kind === "Panic") {
this.assert(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe("INTEGRATION: Reverted with", function () {
args: ["some reason"],
failedAssert: (x) => expect(x).to.not.be.revertedWith("some reason"),
failedAssertReason:
"Expected transaction NOT to be reverted with reason 'some reason', but it did",
"Expected transaction NOT to be reverted with reason 'some reason', but it was",
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ describe("INTEGRATION: Reverted with custom error", function () {
"SomeCustomError"
),
failedAssertReason:
"Expected transaction NOT to be reverted with custom error 'SomeCustomError', but it did",
"Expected transaction NOT to be reverted with custom error 'SomeCustomError', but it was",
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ describe("INTEGRATION: Reverted with panic", function () {
failedAssert: (x) =>
expect(x).to.not.be.revertedWithPanic(PANIC_CODES.ASSERTION_ERROR),
failedAssertReason:
"Expected transaction NOT to be reverted with panic code 0x01 (Assertion error), but it did",
"Expected transaction NOT to be reverted with panic code 0x01 (Assertion error), but it was",
});

await runFailedAsserts({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe("INTEGRATION: Reverted without reason string", function () {
failedAssert: (x) =>
expect(x).to.not.be.revertedWithoutReasonString(),
failedAssertReason:
"Expected transaction NOT to be reverted without a reason string, but it did",
"Expected transaction NOT to be reverted without a reason string, but it was",
});
});
});
Expand Down

0 comments on commit 0ac4e1e

Please sign in to comment.