Lesson:14 TypeError: randomIpfsNft.requestNft is not a function #4832
Unanswered
Shawon-Mandal
asked this question in
Q&A
Replies: 1 comment
-
@Shawon-Mandal Your function name is |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I wrote the RandomIpfsNft.test.js according the git repo and got this huge error :
Basic NFT Unit Tests
Constructor
✓ Initializes the NFT Correctly.
Mint NFT
✓ Allows users to mint an NFT, and updates appropriately
✓ Show the correct balance and owner of an NFT
Random IPFS NFT Unit Tests
constructor
TypeError: randomIpfsNft.requestNft is not a function
at /home/shawon/hh-fcc/hardhat-nft-fcc/test/unit/randomIpfsNft.test.js:68:74
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 passing (15s)
6 failing
Random IPFS NFT Unit Tests
constructor
sets starting values correctly:
TypeError: randomIpfsNft.getInitialized is not a function
at Context. (test/unit/randomIpfsNft.test.js:23:61)
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)
Random IPFS NFT Unit Tests
requestNft
fails if payment isn't sent with the request:
TypeError: randomIpfsNft.requestNft is not a function
at Context. (test/unit/randomIpfsNft.test.js:31:46)
at processImmediate (node:internal/timers:466:21)
Random IPFS NFT Unit Tests
requestNft
reverts if payment amount is less than the mint fee:
TypeError: randomIpfsNft.requestNft is not a function
at Context. (test/unit/randomIpfsNft.test.js:38:37)
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)
Random IPFS NFT Unit Tests
requestNft
emits an event and kicks off a random word request:
TypeError: randomIpfsNft.requestNft is not a function
at Context. (test/unit/randomIpfsNft.test.js:45:46)
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)
Random IPFS NFT Unit Tests
fulfillRandomWords
mints NFT after random number is returned:
TypeError: randomIpfsNft.requestNft is not a function
at /home/shawon/hh-fcc/hardhat-nft-fcc/test/unit/randomIpfsNft.test.js:68:74
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)
Random IPFS NFT Unit Tests
getBreedFromModdedRng
should revert if moddedRng > 99:
AssertionError: Expected transaction to be reverted
-Transaction NOT reverted.
+Transaction reverted.
my repo: https://github.com/Shawon-Mandal/Lesson-14-NFT
Beta Was this translation helpful? Give feedback.
All reactions