File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/amazonq/test/unit/codewhisperer/util Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ function aCompletion(): Completion {
3939}
4040
4141describe ( 'telemetryHelper' , function ( ) {
42+ const session = CodeWhispererSessionState . instance . getSession ( )
4243 describe ( 'clientComponentLatency' , function ( ) {
4344 let sut : TelemetryHelper
4445
@@ -48,10 +49,10 @@ describe('telemetryHelper', function () {
4849
4950 afterEach ( function ( ) {
5051 sinon . restore ( )
52+ session . reset ( )
5153 } )
5254
5355 it ( 'resetClientComponentLatencyTime should reset state variables' , function ( ) {
54- const session = CodeWhispererSessionState . instance . getSession ( )
5556 session . invokeSuggestionStartTime = 100
5657 session . preprocessEndTime = 200
5758 session . sdkApiCallStartTime = 300
@@ -290,7 +291,6 @@ describe('telemetryHelper', function () {
290291 } )
291292
292293 it ( 'Should call telemetry record for each recommendations with proper arguments' , async function ( ) {
293- const session = CodeWhispererSessionState . instance . getSession ( )
294294 const telemetryHelper = new TelemetryHelper ( )
295295 const response = [ { content : "print('Hello')" } ]
296296 const requestIdList = [ 'test_x' , 'test_x' , 'test_y' ]
You can’t perform that action at this time.
0 commit comments