Why does my test for overflow for totalFees
in PuppyRaffle
doesn't work?
#165
-
The below is my test:
Output from console:
It somehow passes but doesn't work Meanwhile the test that Patrick provided:
Console log output:
This works with different outputs! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hello @sharonphiliplima, I am still trying to figure out the issue. Your test output result shows that your test was successful. Concerning the difference in the fee output, Patrick had a total of 93 participants by the end of the second raffle, and you had 95 total participants on a single raffle; the total difference in the total number of participants would affect the fee output. Also, why did you divide your Finally, if the entrance fee charged is different, that would also affect the total fee calculation; I found out Patrick charges 1 Ether per entry from my calculation, so you should make sure your test is also charging the same to have the exact figure as Patrick. |
Beta Was this translation helpful? Give feedback.
So i ralized that the issue arise from this line of your code;
You are passing the value of
expectedFeeCollected
while trying toconsole.log
actualFeeCollected