TESTS FOR MY ERC20 TOKEN IS NOT WORKING #1766
UncleKweks
started this conversation in
Show and tell
Replies: 1 comment
-
Hello @UncleKweks, All of these tests failed for apparent reasons. I will advise you to read the error messages to help you resolve the issues. If you don't know how to resolve a failed test by reading and understanding the test error message then I will advise that you take Cyfrin |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone. Complete noob here(still in my early learning phase). Copied this code(s) off the github repo of the course I am learning with. I made a few adjustments here and there and tested my code. 2 out of 7 are passing, this 5 are failing. Anybody knows why? I'd appreciate all the help I can get
GNairaToken contract
Deployment
Should set the max capped supply to the argument provided during deployment:
TypeError: Cannot read properties of undefined (reading 'formatEther')
at Context. (test\GNairaToken.js:34:38)
GNairaToken contract
Deployment
Should set the blockReward to the argument provided during deployment:
TypeError: Cannot read properties of undefined (reading 'formatEther')
at Context. (test\GNairaToken.js:39:38)
GNairaToken contract
Transactions
Should transfer tokens between accounts:
ReferenceError: oceanToken is not defined
at Context. (test\GNairaToken.js:49:28)
GNairaToken contract
Transactions
Should fail if sender doesn't have enough tokens:
AssertionError: Expected transaction to be reverted with reason 'ERC20: transfer amount exceeds balance', but it reverted with a custom error
at Context. (test\GNairaToken.js:63:7)
GNairaToken contract
Transactions
Should update balances after transfers:
TypeError: initialOwnerBalance.sub is not a function
at Context. (test\GNairaToken.js:84:62)
Beta Was this translation helpful? Give feedback.
All reactions