Closed Muktarsadiq closed 1 year ago
I just cloned the repo and tests are passing OK for me.
What happens when you do:
git clone https://github.com/PatrickAlphaC/hardhat-fund-me-fcc
cd hardhat-fund-me-fcc
yarn
yarn test
If you still get an error, please update the issue. Otherwise: Can you:
I think you should rename it to fundMe not FundMe when you call the functions
at 11:50:00 I tried to run all my test locally but they all failed and produced these errors FundMe constructor
0 passing (1s) 7 failing
1) FundMe constructor sets the aggregator addresses correctly: TypeError: FundMe.getPriceFeed is not a function at Context. (test/staging/units/FundMe.test.js:23:43)
at processImmediate (node:internal/timers:466:21)
2) FundMe fund Fails if you don't send enough ETH: AssertionError: Expected transaction to be reverted with reason 'You need to spend more ETH!', but it reverted with reason 'Didn't send enough!' at processTicksAndRejections (node:internal/process/task_queues:96:5) at runNextTicks (node:internal/process/task_queues:65:3) at listOnTimeout (node:internal/timers:528:9) at processTimers (node:internal/timers:502:7) at Context. (test/staging/units/FundMe.test.js:30:13)
3) FundMe fund Updates the amount funded data structure: ReferenceError: fundMe is not defined at Context. (test/staging/units/FundMe.test.js:36:30)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at runNextTicks (node:internal/process/task_queues:65:3)
at listOnTimeout (node:internal/timers:528:9)
at processTimers (node:internal/timers:502:7)
4) FundMe fund Adds funder to array of funders: TypeError: FundMe.getFunder is not a function at Context. (test/staging/units/FundMe.test.js:43:43)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at runNextTicks (node:internal/process/task_queues:65:3)
at listOnTimeout (node:internal/timers:528:9)
at processTimers (node:internal/timers:502:7)
5) FundMe withdraw withdraw Eth from a single funder: TypeError: FundMe.provider.getbalance is not a function at Context. (test/staging/units/FundMe.test.js:56:67)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at runNextTicks (node:internal/process/task_queues:65:3)
at listOnTimeout (node:internal/timers:528:9)
at processTimers (node:internal/timers:502:7)
6) FundMe withdraw allows us to withdraw with mutiple funders: TypeError: FundMe.provider.getbalance is not a function at Context. (test/staging/units/FundMe.test.js:78:71)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at runNextTicks (node:internal/process/task_queues:65:3)
at listOnTimeout (node:internal/timers:528:9)
at processTimers (node:internal/timers:502:7)
7) FundMe withdraw lets only the owner withdraw funds: AssertionError: Expected transaction to be reverted with reason 'NotOwner', but it reverted with a custom error at processTicksAndRejections (node:internal/process/task_queues:96:5) at runNextTicks (node:internal/process/task_queues:65:3) at listOnTimeout (node:internal/timers:528:9) at processTimers (node:internal/timers:502:7) at Context. (test/staging/units/FundMe.test.js:103:13)