Skip to content

BUG : when a user does multiple votes the test is expected to reverted with message "User Voted" but the contract reverts with a custom error #101

Open
@rairohit17

Description

while running the tests one test fails with : ElectionFactory and Election Contracts
Voting Process
Should allow voting and ensure only one vote per user:
AssertionError: Expected transaction to be reverted with reason 'User Voted', but it reverted with a custom
error
at Context. (test\ElectionTest.js:177:7)

this happens because the test expects to be reverted with "User Voted" but the contract reverts with a custom error

Image

Image

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions