Skip to content

Commit

Permalink
fix: applying mr suggestions comparing to equals rather than not equa…
Browse files Browse the repository at this point in the history
…ls (#191)

Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas@arianelabs.com>
  • Loading branch information
arianejasuwienas committed Jan 23, 2025
1 parent ffe7144 commit 768913d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions examples/hardhat-hts/test/nft-ownerof.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ describe('NFT example -- ownerOf', function () {
it('should get `ownerOf` account holder', async function () {
// https://hashscan.io/mainnet/token/0.0.4970613
const nft = await getContractAt('IERC721', '0x00000000000000000000000000000000004bd875');
expect(await nft['ownerOf'](1)).to.not.be.equal(
'0x0000000000000000000000000000000000000000'
);

// The assertion below cannot be guaranteed, since we can only query the current owner of the NFT,
// Note that the ownership of the NFT may change over time.
expect(await nft['ownerOf'](1)).to.be.equal('0x0000000000000000000000000000000000161927');
});
});
4 changes: 3 additions & 1 deletion examples/hardhat-hts/test/nft.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ describe('NFT example', function () {
await connectAs(nft, holder)['approve'](spender, serialId);
expect(await nft['getApproved'](serialId)).to.be.equal(spender.address);
await connectAs(nft, spender)['transferFrom'](holder, receiver, serialId);
expect(await nft['getApproved'](serialId)).to.not.be.equal(spender.address);
expect(await nft['getApproved'](serialId)).to.be.equal(
'0x0000000000000000000000000000000000000000'
);
expect(await nft['ownerOf'](serialId)).to.be.equal(receiver);
});

Expand Down

0 comments on commit 768913d

Please sign in to comment.