Is there a typo for basicNft.test.js?
UnknownedPhyrexia opened this issue · comments
Jason Teng commented
Hi @PatrickAlphaC!
Hope all is well for you.
I was just running this basicNft.test.js, and for some reason I can only get "Show the correct balance and owner of an NFT" to pass is if I changed:
const owner = await basicNft.ownerOf("1")
to
const owner = await basicNft.ownerOf("0")
Which makes sense to me because the first NFT minted would have tokenId of 0, not 1.
I get "invalid token ID" error if I used 1.
Just like to check if my assessment is correct? Thank you.
it("Show the correct balance and owner of an NFT", async function () {
const deployerAddress = deployer.address;
const deployerBalance = await basicNft.balanceOf(deployerAddress)
const owner = await basicNft.ownerOf("1")
assert.equal(deployerBalance.toString(), "1")
assert.equal(owner, deployerAddress)
Patrick Collins commented
Oops. I just updated the repo. Had to move where we updated the token counter. Thank yoU!