@@ -14,7 +14,7 @@ import { FakeExtensionContext } from '../../fakeExtensionContext'
14
14
import * as diagnosticsProvider from '../../../codewhisperer/service/diagnosticsProvider'
15
15
import { getTestWorkspaceFolder } from '../../../testInteg/integrationTestsUtilities'
16
16
import { join } from 'path'
17
- import { closeAllEditors } from '../../testUtil'
17
+ import { assertTelemetry , closeAllEditors } from '../../testUtil'
18
18
import { stub } from '../../utilities/stubber'
19
19
import { HttpResponse } from 'aws-sdk'
20
20
import { getTestWindow } from '../../shared/vscode/window'
@@ -27,6 +27,7 @@ import {
27
27
stopScanMessage ,
28
28
} from '../../../codewhisperer/models/constants'
29
29
import * as model from '../../../codewhisperer/models/model'
30
+ import { CodewhispererSecurityScan } from '../../../shared/telemetry/telemetry.gen'
30
31
31
32
const mockCreateCodeScanResponse = {
32
33
$response : {
@@ -265,5 +266,11 @@ describe('startSecurityScan', function () {
265
266
extensionContext
266
267
)
267
268
assert . ok ( commandSpy . calledWith ( codeScanLogsOutputChannelId ) )
269
+ assertTelemetry ( 'codewhisperer_securityScan' , {
270
+ codewhispererLanguage : 'python' ,
271
+ codewhispererCodeScanTotalIssues : 1 ,
272
+ codewhispererCodeScanIssuesWithFixes : 0 ,
273
+ codewhispererCodeScanLines : 188 ,
274
+ } as CodewhispererSecurityScan )
268
275
} )
269
276
} )
0 commit comments