From 883021e6b1cb4e0efa8bf8136f79b78b94ebd80c Mon Sep 17 00:00:00 2001 From: atticusofsparta Date: Mon, 11 Nov 2024 11:40:37 -0600 Subject: [PATCH] fix(tests): add test for total supply --- test/balances.test.mjs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/balances.test.mjs b/test/balances.test.mjs index 6ca3007..bdc99e9 100644 --- a/test/balances.test.mjs +++ b/test/balances.test.mjs @@ -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: [ @@ -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'); + }); });