@@ -60,7 +60,7 @@ describe("feature evaluation", () => {
6060 await featureManager . isEnabled ( "TestFeature" ) ;
6161 expect ( evaluationResult ?. feature ?. id ) . to . eq ( "TestFeature" ) ;
6262 expect ( evaluationResult ?. enabled ) . to . eq ( true ) ;
63- expect ( evaluationResult ?. userId ) . to . eq ( undefined ) ;
63+ expect ( evaluationResult ?. targetingId ) . to . eq ( undefined ) ;
6464 expect ( evaluationResult ?. variant ) . to . eq ( undefined ) ;
6565 expect ( evaluationResult ?. variantAssignmentReason ) . to . eq ( VariantAssignmentReason . None ) ;
6666 } ) ;
@@ -95,14 +95,14 @@ describe("feature evaluation", () => {
9595 await featureManager . getVariant ( "TestFeature1" , { userId : "Jim" } ) ;
9696 expect ( evaluationResult ?. feature ?. id ) . to . eq ( "TestFeature1" ) ;
9797 expect ( evaluationResult ?. enabled ) . to . eq ( false ) ; // status override
98- expect ( evaluationResult ?. userId ) . to . eq ( "Jim" ) ;
98+ expect ( evaluationResult ?. targetingId ) . to . eq ( "Jim" ) ;
9999 expect ( evaluationResult ?. variant ?. name ) . to . eq ( "Big" ) ;
100100 expect ( evaluationResult ?. variantAssignmentReason ) . to . eq ( VariantAssignmentReason . DefaultWhenEnabled ) ;
101101
102102 await featureManager . getVariant ( "TestFeature2" , { userId : "Jim" } ) ;
103103 expect ( evaluationResult ?. feature ?. id ) . to . eq ( "TestFeature2" ) ;
104104 expect ( evaluationResult ?. enabled ) . to . eq ( true ) ;
105- expect ( evaluationResult ?. userId ) . to . eq ( "Jim" ) ;
105+ expect ( evaluationResult ?. targetingId ) . to . eq ( "Jim" ) ;
106106 expect ( evaluationResult ?. variant ) . to . eq ( undefined ) ;
107107 expect ( evaluationResult ?. variantAssignmentReason ) . to . eq ( VariantAssignmentReason . DefaultWhenEnabled ) ;
108108 } ) ;
@@ -137,14 +137,14 @@ describe("feature evaluation", () => {
137137 await featureManager . getVariant ( "TestFeature1" , { userId : "Jeff" } ) ;
138138 expect ( evaluationResult ?. feature ?. id ) . to . eq ( "TestFeature1" ) ;
139139 expect ( evaluationResult ?. enabled ) . to . eq ( false ) ; // status oveerride won't work when feature's enabled is false
140- expect ( evaluationResult ?. userId ) . to . eq ( "Jeff" ) ;
140+ expect ( evaluationResult ?. targetingId ) . to . eq ( "Jeff" ) ;
141141 expect ( evaluationResult ?. variant ?. name ) . to . eq ( "Small" ) ;
142142 expect ( evaluationResult ?. variantAssignmentReason ) . to . eq ( VariantAssignmentReason . DefaultWhenDisabled ) ;
143143
144144 await featureManager . getVariant ( "TestFeature2" , { userId : "Jeff" } ) ;
145145 expect ( evaluationResult ?. feature ?. id ) . to . eq ( "TestFeature2" ) ;
146146 expect ( evaluationResult ?. enabled ) . to . eq ( false ) ;
147- expect ( evaluationResult ?. userId ) . to . eq ( "Jeff" ) ;
147+ expect ( evaluationResult ?. targetingId ) . to . eq ( "Jeff" ) ;
148148 expect ( evaluationResult ?. variant ) . to . eq ( undefined ) ;
149149 expect ( evaluationResult ?. variantAssignmentReason ) . to . eq ( VariantAssignmentReason . DefaultWhenDisabled ) ;
150150 } ) ;
@@ -170,7 +170,7 @@ describe("feature evaluation", () => {
170170 await featureManager . getVariant ( "TestFeature" , { userId : "Jeff" } ) ;
171171 expect ( evaluationResult ?. feature ?. id ) . to . eq ( "TestFeature" ) ;
172172 expect ( evaluationResult ?. enabled ) . to . eq ( true ) ;
173- expect ( evaluationResult ?. userId ) . to . eq ( "Jeff" ) ;
173+ expect ( evaluationResult ?. targetingId ) . to . eq ( "Jeff" ) ;
174174 expect ( evaluationResult ?. variant ?. name ) . to . eq ( "Big" ) ;
175175 expect ( evaluationResult ?. variantAssignmentReason ) . to . eq ( VariantAssignmentReason . User ) ;
176176 } ) ;
@@ -196,7 +196,7 @@ describe("feature evaluation", () => {
196196 await featureManager . getVariant ( "TestFeature" , { userId : "Jeff" , groups : [ "admin" ] } ) ;
197197 expect ( evaluationResult ?. feature ?. id ) . to . eq ( "TestFeature" ) ;
198198 expect ( evaluationResult ?. enabled ) . to . eq ( true ) ;
199- expect ( evaluationResult ?. userId ) . to . eq ( "Jeff" ) ;
199+ expect ( evaluationResult ?. targetingId ) . to . eq ( "Jeff" ) ;
200200 expect ( evaluationResult ?. variant ?. name ) . to . eq ( "Big" ) ;
201201 expect ( evaluationResult ?. variantAssignmentReason ) . to . eq ( VariantAssignmentReason . Group ) ;
202202 } ) ;
@@ -222,7 +222,7 @@ describe("feature evaluation", () => {
222222 await featureManager . getVariant ( "TestFeature" , { userId : "Marsha" } ) ;
223223 expect ( evaluationResult ?. feature ?. id ) . to . eq ( "TestFeature" ) ;
224224 expect ( evaluationResult ?. enabled ) . to . eq ( false ) ; // status override
225- expect ( evaluationResult ?. userId ) . to . eq ( "Marsha" ) ;
225+ expect ( evaluationResult ?. targetingId ) . to . eq ( "Marsha" ) ;
226226 expect ( evaluationResult ?. variant ?. name ) . to . eq ( "Big" ) ;
227227 expect ( evaluationResult ?. variantAssignmentReason ) . to . eq ( VariantAssignmentReason . Percentile ) ;
228228 } ) ;
0 commit comments