Skip to content

Commit

Permalink
removed unused imports
Browse files Browse the repository at this point in the history
Signed-off-by: wadeking98 <wkingnumber2@gmail.com>
  • Loading branch information
wadeking98 committed Feb 10, 2024
1 parent 9dbc405 commit 06e4f30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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 () => {
Expand All @@ -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)

Check failure on line 45 in packages/core/src/modules/drpc/__tests__/drpc-messages.e2e.test.ts

View workflow job for this annotation

GitHub Actions / Validate

Delete `··`
})

afterEach(async () => {
Expand Down Expand Up @@ -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 (_) => {

Check warning on line 140 in packages/core/src/modules/drpc/__tests__/drpc-messages.e2e.test.ts

View workflow job for this annotation

GitHub Actions / Validate

'_' is defined but never used
notified = true
return {}
})
Expand Down Expand Up @@ -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 (_) => {

Check warning on line 177 in packages/core/src/modules/drpc/__tests__/drpc-messages.e2e.test.ts

View workflow job for this annotation

GitHub Actions / Validate

'_' is defined but never used
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
}
Expand Down

0 comments on commit 06e4f30

Please sign in to comment.