Skip to content

Commit 4d13116

Browse files
committed
fix test case
1 parent b81dd43 commit 4d13116

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/core/src/codewhisperer/util/telemetryHelper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { CodeAnalysisScope as CodeAnalysisScopeClientSide } from '../models/cons
3131
import { Session } from '../../amazonqTest/chat/session/session'
3232
import { sleep } from '../../shared/utilities/timeoutUtils'
3333
import { getDiagnosticsDifferences, getDiagnosticsOfCurrentFile, toIdeDiagnostics } from './diagnosticsUtil'
34-
import { Auth } from '../../auth'
34+
import { Auth } from '../../auth/auth'
3535

3636
export class TelemetryHelper {
3737
// Some variables for client component latency
@@ -425,7 +425,7 @@ export class TelemetryHelper {
425425
e2eLatency = 0.0
426426
}
427427

428-
let userTriggerDecisionEvent: CodeWhispererUserClient.UserTriggerDecisionEvent = {
428+
const userTriggerDecisionEvent: CodeWhispererUserClient.UserTriggerDecisionEvent = {
429429
sessionId: sessionId,
430430
requestId: this.sessionDecisions[0].codewhispererFirstRequestId,
431431
customizationArn: selectedCustomization.arn === '' ? undefined : selectedCustomization.arn,

packages/core/src/test/amazonq/common/contentController.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ import assert from 'assert'
77
import { EditorContentController } from '../../../amazonq/commons/controllers/contentController'
88
import { toTextEditor } from '../../testUtil'
99
import { CWCTelemetryHelper } from '../../../codewhispererChat/controllers/chat/telemetryHelper'
10+
import { ChatSessionStorage } from '../../../codewhispererChat/storages/chatSession'
11+
import { TriggerEventsStorage } from '../../../codewhispererChat'
1012

1113
describe('contentController', () => {
1214
let controller: EditorContentController
1315

1416
beforeEach(async () => {
1517
controller = new EditorContentController()
16-
CWCTelemetryHelper.instance
18+
CWCTelemetryHelper.instance = new CWCTelemetryHelper(new ChatSessionStorage(), new TriggerEventsStorage())
1719
})
1820

1921
describe('insertTextAtCursorPosition', () => {
@@ -33,7 +35,7 @@ describe('contentController', () => {
3335
}
3436
})
3537

36-
it('insert code when left hand size has non empty character', async () => {
38+
it('insert code when left hand size has non empty character 2', async () => {
3739
const editor = await toTextEditor('def hello_world():\n ', 'test.py')
3840
if (editor) {
3941
const pos = new vscode.Position(0, 4)

0 commit comments

Comments
 (0)