-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlatest.log
More file actions
39 lines (34 loc) · 1.47 KB
/
Copy pathlatest.log
File metadata and controls
39 lines (34 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Run Timestamp: 2026-04-10T07:35:49.520Z
Command: npx hardhat test
Exit Code: 0
◇ injected env (5) from .env // tip: ⌁ auth for agents [www.vestauth.com]
Voting Contract
Deployment
✔ Should initialize candidates correctly (47ms)
✔ Should fail when deployed with no candidates (47ms)
✔ Should fail when deployed with zero duration
✔ Should fail when any candidate name is empty
✔ Should fail when deployed with duplicate candidate names
✔ Should set the correct owner
✔ Should set correct voting time
Candidate Management
✔ Owner can add candidate BEFORE voting starts
✔ Should fail if candidate name is empty (185ms)
✔ Should fail if candidate already exists
✔ Should fail if non-owner tries to add candidate
✔ Should fail if adding candidate AFTER voting starts
Voting
✔ Should allow a user to vote
✔ Should prevent double voting
✔ Should reject invalid candidate index
✔ Should record which candidate a voter voted for
✔ Should fail if user hasn't voted and calls voterVotedFor
Voting Time Logic
✔ Should return true when voting is active
✔ Should prevent voting AFTER voting ends
✔ Should return 0 remaining time after voting ends
✔ Should return correct remaining time during voting
View Functions
✔ Should return all candidates
✔ Should return vote counts correctly
23 passing (3s)