We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77c4b32 commit 8e1f870Copy full SHA for 8e1f870
tests/nodes/agent/handlers/nodesClaimsGet.test.ts
@@ -329,5 +329,21 @@ describe('nodesClaimsGet', () => {
329
expect(isSorted).toBe(true);
330
});
331
332
+ test('Should return no results when the DB is empty', async () => {
333
+ // We do not add any claims to the DB here, leaving it empty
334
+
335
+ // Make the RPC call without any parameters
336
+ const response = await rpcClient.methods.nodesClaimsGet({});
337
338
+ // Collect all results into an array
339
+ const claimIds: Array<string> = [];
340
+ for await (const claim of response) {
341
+ claimIds.push(claim.claimIdEncoded ?? '');
342
+ }
343
344
+ // Verify the array is empty
345
+ expect(claimIds).toHaveLength(0);
346
+ });
347
348
349
0 commit comments