Skip to content

Commit 364237b

Browse files
committed
fix: did a lintfix
1 parent 8e1f870 commit 364237b

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

src/nodes/agent/handlers/NodesAuditEventsGet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type {
88
AgentAuditMessage,
99
} from '../types';
1010
import type Audit from '../../../audit/Audit';
11-
import type { AuditEvent } from '@/audit/types';
11+
import type { AuditEvent } from '../../../audit/types';
1212
import { ServerHandler } from '@matrixai/rpc';
1313
import * as auditUtils from '../../../audit/utils';
1414

src/nodes/agent/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type {
55
} from '@matrixai/rpc';
66
import type { SignedTokenEncoded } from '../../tokens/types';
77
import type {
8-
AuditEventId,
98
AuditEventIdEncoded,
109
ClaimIdEncoded,
1110
NodeIdEncoded,
@@ -15,7 +14,7 @@ import type { VaultAction, VaultName } from '../../vaults/types';
1514
import type { SignedNotification } from '../../notifications/types';
1615
import type { Host, Hostname, Port } from '../../network/types';
1716
import type { NodeContact } from '../../nodes/types';
18-
import type { AuditEvent } from '@/audit/types';
17+
import type { AuditEvent } from '../../audit/types';
1918

2019
type AgentRPCRequestParams<T extends JSONObject = JSONObject> =
2120
JSONRPCRequestParams<T>;

tests/nodes/agent/handlers/nodesClaimsGet.test.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { IdentityId, ProviderId } from '@/identities/types';
2-
import type { ClaimIdEncoded } from '@/ids';
32
import fs from 'fs';
43
import path from 'path';
54
import 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

Comments
 (0)