Skip to content

Commit f919bb3

Browse files
author
Yash Agrawal
committed
feat: update test cases for mint
1 parent fb86d18 commit f919bb3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/SBT.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@ describe('SBT', () => {
107107
)
108108
.to.emit(sbt, 'Minted')
109109
.withArgs(0, signers.userA.address)
110+
111+
const tokensOfUserA = await sbt.tokensOfOwner(signers.userA.address)
112+
expect(tokensOfUserA.length).to.eq(1)
113+
expect(tokensOfUserA[0]).to.eq(0)
114+
expect(await sbt.totalSupply()).to.eq(1)
115+
expect(await sbt.currentIndex()).to.eq(1)
116+
expect(await sbt.ownerOf(0)).to.eq(signers.userA.address)
117+
expect(await sbt.balanceOf(signers.userA.address)).to.eq(1)
118+
expect(await sbt.tokenOfOwnerByIndex(signers.userA.address, 0)).to.eq(0)
119+
expect(await sbt.tokenByIndex(0)).to.eq(0)
110120
})
111121

112122
it('The mint function can be executed by minter', async () => {

0 commit comments

Comments
 (0)