Skip to content

Commit

Permalink
fix(tests): add test for total supply
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Nov 11, 2024
1 parent e25cb47 commit 883021e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/balances.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ describe('aos Balances', async () => {
return JSON.parse(result.Messages[0].Data);
}

async function getTotalSupply(mem) {
const result = await handle(
{
Tags: [{ name: 'Action', value: 'Total-Supply' }],
},
mem,
);

return result.Messages[0].Data;
}

it('should fetch the owner balance', async () => {
const result = await handle({
Tags: [
Expand Down Expand Up @@ -122,4 +133,8 @@ describe('aos Balances', async () => {
const info = await getInfo(result.Memory);
assert(info.Logo === logo, 'Failed to set logo');
});
it('should get total supply', async () => {
const res = await getTotalSupply();
assert(res, 'total supply should be equal to 1');
});
});

0 comments on commit 883021e

Please sign in to comment.