11import type { IdentityId , ProviderId } from '@/identities/types' ;
2- import type { ClaimIdEncoded } from '@/ids' ;
32import fs from 'fs' ;
43import path from 'path' ;
54import os from 'os' ;
@@ -198,7 +197,6 @@ describe('nodesClaimsGet', () => {
198197 } ) ;
199198
200199 test ( 'Should get chain data with limit' , async ( ) => {
201-
202200 const srcNodeIdEncoded = nodesUtils . encodeNodeId ( keyRing . getNodeId ( ) ) ;
203201 // Add 10 claims
204202 for ( let i = 1 ; i <= 5 ; i ++ ) {
@@ -224,8 +222,7 @@ describe('nodesClaimsGet', () => {
224222 await sigchain . addClaim ( identityLink ) ;
225223 }
226224
227-
228- let limitVal = 5 ;
225+ const limitVal = 5 ;
229226
230227 const response = await rpcClient . methods . nodesClaimsGet ( {
231228 limit : limitVal ,
@@ -270,9 +267,8 @@ describe('nodesClaimsGet', () => {
270267 for await ( const claim of response ) {
271268 chainIds . push ( claim . claimIdEncoded ?? '' ) ;
272269 }
273-
274270
275- //Verify that chainIds are in descending order
271+ // Verify that chainIds are in descending order
276272 let isSorted = true ;
277273 for ( let i = 0 ; i < chainIds . length - 1 ; i ++ ) {
278274 if ( chainIds [ i ] < chainIds [ i + 1 ] ) {
@@ -281,7 +277,6 @@ describe('nodesClaimsGet', () => {
281277 }
282278 }
283279 expect ( isSorted ) . toBe ( true ) ;
284-
285280 } ) ;
286281
287282 test ( 'Should get chain data with order asc' , async ( ) => {
@@ -318,7 +313,7 @@ describe('nodesClaimsGet', () => {
318313 chainIds . push ( claim . claimIdEncoded ?? '' ) ;
319314 }
320315
321- //Verify that chainIds are in ascending order
316+ // Verify that chainIds are in ascending order
322317 let isSorted = true ;
323318 for ( let i = 0 ; i < chainIds . length - 1 ; i ++ ) {
324319 if ( chainIds [ i ] > chainIds [ i + 1 ] ) {
@@ -331,19 +326,17 @@ describe('nodesClaimsGet', () => {
331326
332327 test ( 'Should return no results when the DB is empty' , async ( ) => {
333328 // We do not add any claims to the DB here, leaving it empty
334-
329+
335330 // Make the RPC call without any parameters
336331 const response = await rpcClient . methods . nodesClaimsGet ( { } ) ;
337-
332+
338333 // Collect all results into an array
339334 const claimIds : Array < string > = [ ] ;
340335 for await ( const claim of response ) {
341336 claimIds . push ( claim . claimIdEncoded ?? '' ) ;
342337 }
343-
338+
344339 // Verify the array is empty
345340 expect ( claimIds ) . toHaveLength ( 0 ) ;
346341 } ) ;
347-
348-
349342} ) ;
0 commit comments