Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 opened this issue Jan 18, 2025 · 0 comments · May be fixed by #102

Comments

@rairohit17
Copy link

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

@rairohit17 rairohit17 linked a pull request Jan 18, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant