From d3f7adddcd636031cf5e3c82b1c91b5261204cad Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Wed, 23 Oct 2024 09:43:35 -0500 Subject: [PATCH] chore(arns): fix arns count test --- tests/monitor/monitor.test.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/monitor/monitor.test.mjs b/tests/monitor/monitor.test.mjs index 8f854da..b13724f 100644 --- a/tests/monitor/monitor.test.mjs +++ b/tests/monitor/monitor.test.mjs @@ -484,8 +484,8 @@ describe('setup', () => { const twoWeeks = 2 * 7 * 24 * 60 * 60 * 1000; it('should not have any arns records older than two weeks', async () => { let cursor = ''; - let countedTotalArns = 0; let totalArns = 0; + const uniqueNames = new Set(); do { const { items: arns, @@ -495,8 +495,8 @@ describe('setup', () => { cursor, }); totalArns = totalItems; - countedTotalArns += arns.length; for (const arn of arns) { + uniqueNames.add(arn.name); assert(arn.processId, `ARNs name '${arn.name}' has no processId`); assert(arn.type, `ARNs name '${arn.name}' has no type`); assert( @@ -532,8 +532,8 @@ describe('setup', () => { cursor = nextCursor; } while (cursor !== undefined); assert( - countedTotalArns === totalArns, - `Counted total ARNs (${countedTotalArns}) does not match total ARNs (${totalArns})`, + uniqueNames.size === totalArns, + `Counted total ARNs (${uniqueNames.size}) does not match total ARNs (${totalArns})`, ); }); });