From 79bdc3e6f3994d25b23fe9123768b2ad1c4008df Mon Sep 17 00:00:00 2001 From: Shrenuj Bansal Date: Wed, 13 Mar 2024 15:23:45 -0400 Subject: [PATCH] fix test bug Signed-off-by: Shrenuj Bansal --- .../postgres/__tests__/lib/api-translations.test.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indexer/packages/postgres/__tests__/lib/api-translations.test.ts b/indexer/packages/postgres/__tests__/lib/api-translations.test.ts index 565b806bfe..2ba80bc4a3 100644 --- a/indexer/packages/postgres/__tests__/lib/api-translations.test.ts +++ b/indexer/packages/postgres/__tests__/lib/api-translations.test.ts @@ -38,14 +38,20 @@ describe('apiTranslations', () => { }); describe('getChildSubaccountNums', () => { - it('Gets a list of all possible child subaccount numbers for a parent subaccount number', () => { + it('Gets a list of all possible child subaccount numbers for a parent subaccount 0', () => { const childSubaccounts = getChildSubaccountNums(0); expect(childSubaccounts.length).toEqual(1000); expect(childSubaccounts[0]).toEqual(0); - expect(childSubaccounts[127]).toEqual(127); expect(childSubaccounts[1]).toEqual(128); expect(childSubaccounts[999]).toEqual(128 * 999); }); + it('Gets a list of all possible child subaccount numbers for a parent subaccount 127', () => { + const childSubaccounts = getChildSubaccountNums(127); + expect(childSubaccounts.length).toEqual(1000); + expect(childSubaccounts[0]).toEqual(127); + expect(childSubaccounts[1]).toEqual(128 + 127); + expect(childSubaccounts[999]).toEqual(128 * 999 + 127); + }); }); describe('getChildSubaccountNums', () => {