@@ -12,6 +12,7 @@ import { ApplicationEnvironment } from '../../../client/common/application/appli
1212import { IApplicationEnvironment , IWorkspaceService } from '../../../client/common/application/types' ;
1313import { WorkspaceService } from '../../../client/common/application/workspace' ;
1414import { Channel } from '../../../client/common/constants' ;
15+ import { DiscoveryVariants } from '../../../client/common/experiments/groups' ;
1516import { ExperimentService } from '../../../client/common/experiments/service' ;
1617import { Experiments } from '../../../client/common/utils/localize' ;
1718import * as Telemetry from '../../../client/telemetry' ;
@@ -157,14 +158,14 @@ suite('Experimentation service', () => {
157158
158159 suite ( 'In-experiment-sync check' , ( ) => {
159160 const experiment = 'Test Experiment - experiment' ;
160- let telemetryEvents : { eventName : string ; properties : Record < string , unknown > } [ ] = [ ] ;
161+ let telemetryEvents : { eventName : string ; properties : unknown } [ ] = [ ] ;
161162 let getTreatmentVariable : sinon . SinonStub ;
162163 let sendTelemetryEventStub : sinon . SinonStub ;
163164
164165 setup ( ( ) => {
165166 sendTelemetryEventStub = sinon
166167 . stub ( Telemetry , 'sendTelemetryEvent' )
167- . callsFake ( ( eventName : string , _ , properties : Record < string , unknown > ) => {
168+ . callsFake ( ( eventName : string , _ , properties : unknown ) => {
168169 const telemetry = { eventName, properties } ;
169170 telemetryEvents . push ( telemetry ) ;
170171 } ) ;
@@ -182,6 +183,20 @@ suite('Experimentation service', () => {
182183 sinon . restore ( ) ;
183184 } ) ;
184185
186+ test ( 'Enable discovery experiment without file watching for all users' , async ( ) => {
187+ configureSettings ( true , [ ] , [ ] ) ;
188+
189+ const experimentService = new ExperimentService (
190+ instance ( workspaceService ) ,
191+ instance ( appEnvironment ) ,
192+ globalMemento ,
193+ outputChannel ,
194+ ) ;
195+ const result = experimentService . inExperimentSync ( DiscoveryVariants . discoveryWithoutFileWatching ) ;
196+
197+ assert . isTrue ( result ) ;
198+ } ) ;
199+
185200 test ( 'If the opt-in and opt-out arrays are empty, return the value from the experimentation framework for a given experiment' , async ( ) => {
186201 configureSettings ( true , [ ] , [ ] ) ;
187202
@@ -401,13 +416,13 @@ suite('Experimentation service', () => {
401416 } ) ;
402417
403418 suite ( 'Opt-in/out telemetry' , ( ) => {
404- let telemetryEvents : { eventName : string ; properties : Record < string , unknown > } [ ] = [ ] ;
419+ let telemetryEvents : { eventName : string ; properties : unknown } [ ] = [ ] ;
405420 let sendTelemetryEventStub : sinon . SinonStub ;
406421
407422 setup ( ( ) => {
408423 sendTelemetryEventStub = sinon
409424 . stub ( Telemetry , 'sendTelemetryEvent' )
410- . callsFake ( ( eventName : string , _ , properties : Record < string , unknown > ) => {
425+ . callsFake ( ( eventName : string , _ , properties : unknown ) => {
411426 const telemetry = { eventName, properties } ;
412427 telemetryEvents . push ( telemetry ) ;
413428 } ) ;
0 commit comments