Lesson 14 unit test random IPFS NFT #2951
-
it("reverts if payment amount is less than the mint fee", async function () {
const fee = await randomIpfsNft.getMintFee();
await expect(randomIpfsNft.requestNft({ value: mintFee.sub(ethers.utils.parseEther("0.001")) })
).to.be.revertedWith("RandomIpfsNft__NeedMoreETHSent"); how are we calling the link to unit test: https://github.com/PatrickAlphaC/hardhat-nft-fcc/blob/main/test/unit/randomIpfs.test.js |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
@SidharthK2 We do not need that. |
Beta Was this translation helpful? Give feedback.
-
You can certainly add it if it itches you, but it is redundant as it will not be used at all, and that is primarily the point of the sub-test. Why will it be not used? Because in this subtest, we are checking for |
Beta Was this translation helpful? Give feedback.
@SidharthK2 We do not need that.