@@ -1933,11 +1933,10 @@ describe('DecisionService', () => {
1933
1933
} ) ;
1934
1934
} ) ;
1935
1935
1936
- it ( "should consider global holdout even if local holdout is present" , async ( ) => {
1936
+ it . only ( "should consider global holdout even if local holdout is present" , async ( ) => {
1937
1937
const { decisionService } = getDecisionService ( ) ;
1938
1938
const datafile = getHoldoutTestDatafile ( ) ;
1939
-
1940
- datafile . holdouts . push ( {
1939
+ const newEntry = {
1941
1940
id : 'holdout_included_id' ,
1942
1941
key : 'holdout_included' ,
1943
1942
status : 'Running' ,
@@ -1949,17 +1948,17 @@ describe('DecisionService', () => {
1949
1948
{
1950
1949
id : 'holdout_variation_included_id' ,
1951
1950
key : 'holdout_variation_included' ,
1952
- variables : [ ]
1953
- }
1951
+ variables : [ ] ,
1952
+ } ,
1954
1953
] ,
1955
1954
trafficAllocation : [
1956
1955
{
1957
1956
entityId : 'holdout_variation_included_id' ,
1958
- endOfRange : 5000
1959
- }
1960
- ]
1961
- } ) ;
1962
-
1957
+ endOfRange : 5000 ,
1958
+ } ,
1959
+ ] ,
1960
+ } ;
1961
+ datafile . holdouts = [ newEntry , ... datafile . holdouts ] ;
1963
1962
const config = createProjectConfig ( datafile ) ;
1964
1963
const user = new OptimizelyUserContext ( {
1965
1964
optimizely : { } as any ,
@@ -1968,7 +1967,6 @@ describe('DecisionService', () => {
1968
1967
age : 20 , // satisfies both global holdout (age_22) and included holdout (age_40) audiences
1969
1968
} ,
1970
1969
} ) ;
1971
-
1972
1970
const feature = config . featureKeyMap [ 'flag_1' ] ;
1973
1971
const value = decisionService . resolveVariationsForFeatureList ( 'async' , config , [ feature ] , user , { } ) . get ( ) ;
1974
1972
0 commit comments