Skip to content

to.be.revertedWithCustomError() doesn't work on Sapphire #688

Description

@matevz
SUMMARY

Perhaps related to #686, this works:

await expect(myContract.myFunction())
    .to.be.reverted;

while

await expect(myContract.myFunction())
    .to.be.revertedWithCustomError(myContract, "SomeError");

yields

AssertionError: Expected transaction to be reverted with custom error 'SomeError', but it didn't revert

although the transaction was reverted with the correct error (I checked the localnet explorer), so it just wasn't caught by the wrapper.

ACTUAL RESULTS

Exception is thrown that the tx wasn't reverted.

EXPECTED RESULTS

Tests should pass normally.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions