@@ -9,7 +9,6 @@ import { expect, use } from 'chai';
99import * as chaiAsPromised from 'chai-as-promised' ;
1010import * as path from 'path' ;
1111import * as sinon from 'sinon' ;
12- // import rewiremock from 'rewiremock';
1312import { SemVer } from 'semver' ;
1413import { instance , mock , when } from 'ts-mockito' ;
1514import { DebugAdapterExecutable , DebugAdapterServer , DebugConfiguration , DebugSession , WorkspaceFolder } from 'vscode' ;
@@ -37,7 +36,6 @@ suite('Debugging - Adapter Factory', () => {
3736 let getInterpretersStub : sinon . SinonStub ;
3837 let getInterpreterDetailsStub : sinon . SinonStub ;
3938 let hasInterpretersStub : sinon . SinonStub ;
40- // let sendTelemetryEventStub: sinon.SinonStub;
4139 let getTelemetryReporterStub : sinon . SinonStub ;
4240 let reporter : any ;
4341
@@ -78,7 +76,6 @@ suite('Debugging - Adapter Factory', () => {
7876 getInterpretersStub = sinon . stub ( pythonApi , 'getInterpreters' ) ;
7977 getInterpreterDetailsStub = sinon . stub ( pythonApi , 'getInterpreterDetails' ) ;
8078 hasInterpretersStub = sinon . stub ( pythonApi , 'hasInterpreters' ) ;
81- // sendTelemetryEventStub = sinon.stub(telemetry, 'sendTelemetryEvent');
8279 getTelemetryReporterStub = sinon . stub ( telemetryReporter , 'getTelemetryReporter' ) ;
8380
8481 when (
@@ -93,10 +90,9 @@ suite('Debugging - Adapter Factory', () => {
9390 teardown ( ( ) => {
9491 process . env . VSC_PYTHON_UNIT_TEST = oldValueOfVSC_PYTHON_UNIT_TEST ;
9592 process . env . VSC_PYTHON_CI_TEST = oldValueOfVSC_PYTHON_CI_TEST ;
96- reporter . properties = [ ] ;
97- reporter . eventNames = [ ] ;
98- reporter . measures = [ ] ;
99- // rewiremock.disable();
93+ Reporter . properties = [ ] ;
94+ Reporter . eventNames = [ ] ;
95+ Reporter . measures = [ ] ;
10096 telemetry . clearTelemetryReporter ( ) ;
10197 sinon . restore ( ) ;
10298 } ) ;
@@ -265,14 +261,14 @@ suite('Debugging - Adapter Factory', () => {
265261 assert . deepStrictEqual ( descriptor , debugExecutable ) ;
266262 } ) ;
267263
268- test . only ( 'Send attach to local process telemetry if attaching to a local process' , async ( ) => {
264+ test ( 'Send attach to local process telemetry if attaching to a local process' , async ( ) => {
269265 const session = createSession ( { request : 'attach' , processId : 1234 } ) ;
270266 getInterpreterDetailsStub . resolves ( { path : [ interpreter . path ] } ) ;
271267 resolveEnvironmentStub . withArgs ( interpreter . path ) . resolves ( interpreter ) ;
272268
273269 await factory . createDebugAdapterDescriptor ( session , nodeExecutable ) ;
274270
275- assert . ok ( reporter . eventNames . includes ( EventName . DEBUGGER_ATTACH_TO_LOCAL_PROCESS ) ) ;
271+ assert . ok ( Reporter . eventNames . includes ( EventName . DEBUGGER_ATTACH_TO_LOCAL_PROCESS ) ) ;
276272 } ) ;
277273
278274 test ( "Don't send any telemetry if not attaching to a local process" , async ( ) => {
0 commit comments