From 06e4f30fb9c1587a16acf294245452e4e1a82c28 Mon Sep 17 00:00:00 2001 From: wadeking98 Date: Fri, 9 Feb 2024 18:41:19 -0800 Subject: [PATCH] removed unused imports Signed-off-by: wadeking98 --- .../drpc/__tests__/DRPCMessageService.test.ts | 2 +- .../drpc/__tests__/drpc-messages.e2e.test.ts | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/core/src/modules/drpc/__tests__/DRPCMessageService.test.ts b/packages/core/src/modules/drpc/__tests__/DRPCMessageService.test.ts index dada7d1cf8..7752018874 100644 --- a/packages/core/src/modules/drpc/__tests__/DRPCMessageService.test.ts +++ b/packages/core/src/modules/drpc/__tests__/DRPCMessageService.test.ts @@ -4,7 +4,7 @@ import { getAgentContext, getMockConnection } from '../../../../tests/helpers' import { EventEmitter } from '../../../agent/EventEmitter' import { InboundMessageContext } from '../../../agent/models/InboundMessageContext' import { DRPCMessageRole } from '../DRPCMessageRole' -import { DRPCRequestMessage, DRPCResponseMessage, DRPCResponseObject } from '../messages' +import { DRPCRequestMessage } from '../messages' import { DRPCMessageRecord } from '../repository/DRPCMessageRecord' import { DRPCMessageRepository } from '../repository/DRPCMessageRepository' import { DRPCMessageService } from '../services' diff --git a/packages/core/src/modules/drpc/__tests__/drpc-messages.e2e.test.ts b/packages/core/src/modules/drpc/__tests__/drpc-messages.e2e.test.ts index 2492b0cd55..1abb86edc0 100644 --- a/packages/core/src/modules/drpc/__tests__/drpc-messages.e2e.test.ts +++ b/packages/core/src/modules/drpc/__tests__/drpc-messages.e2e.test.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ import type { SubjectMessage } from '../../../../../../tests/transport/SubjectInboundTransport' import type { ConnectionRecord } from '../../connections' -import type { DRPCResponseObject } from '../messages' +import type { DRPCRequest, DRPCResponseObject } from '../messages' import { Subject } from 'rxjs' @@ -23,7 +23,6 @@ const aliceConfig = getInMemoryAgentOptions('Alice DRPC Messages', { describe('DRPC Messages E2E', () => { let faberAgent: Agent let aliceAgent: Agent - let faberConnection: ConnectionRecord let aliceConnection: ConnectionRecord beforeEach(async () => { @@ -43,7 +42,7 @@ describe('DRPC Messages E2E', () => { aliceAgent.registerInboundTransport(new SubjectInboundTransport(aliceMessages)) aliceAgent.registerOutboundTransport(new SubjectOutboundTransport(subjectMap)) await aliceAgent.initialize() - ;[aliceConnection, faberConnection] = await makeConnection(aliceAgent, faberAgent) + ;[aliceConnection] = await makeConnection(aliceAgent, faberAgent) }) afterEach(async () => { @@ -138,7 +137,7 @@ describe('DRPC Messages E2E', () => { test('Alice sends Faber DRPC notification', async () => { testLogger.test('Alice sends notification to Faber') let notified = false - faberAgent.drpcMessages.createDRPCMethodHandler('notify', async (message) => { + faberAgent.drpcMessages.createDRPCMethodHandler('notify', async (_) => { notified = true return {} }) @@ -175,12 +174,12 @@ describe('DRPC Messages E2E', () => { }) test('Alice sends Faber invalid DRPC message | Faber responds with invalid DRPC message', async () => { - faberAgent.drpcMessages.createDRPCMethodHandler('hello', async (message) => { - return [] as any + faberAgent.drpcMessages.createDRPCMethodHandler('hello', async (_) => { + return [] as unknown as DRPCResponseObject }) let error = false try { - await aliceAgent.drpcMessages.sendDRPCRequest(aliceConnection.id, 'test' as any) + await aliceAgent.drpcMessages.sendDRPCRequest(aliceConnection.id, 'test' as unknown as DRPCRequest) } catch { error = true }