@@ -19,9 +19,9 @@ describe('getExperimentContainer', () => {
19
19
} ) as jest . Mock ;
20
20
21
21
const controlContainer : Container = { name : 'Control Container' } ;
22
- const variation1Container : Container = { name : 'Variation 1 Container' } ;
23
- const variation2Container : Container = { name : 'Variation 2 Container' } ;
24
- const variation3Container : Container = { name : 'Variation 3 Container' } ;
22
+ const treatment1Container : Container = { name : 'Treatment Variation 1 Container' } ;
23
+ const treatment2Container : Container = { name : 'Treatment Variation 2 Container' } ;
24
+ const treatment3Container : Container = { name : 'Treatment Variation 3 Container' } ;
25
25
26
26
let client : EppoClient ;
27
27
let flagExperiment : IFlagExperiment < Container > ;
@@ -36,7 +36,7 @@ describe('getExperimentContainer', () => {
36
36
flagExperiment = {
37
37
flagKey : 'my-key' ,
38
38
controlVariation : controlContainer ,
39
- treatmentVariations : [ variation1Container , variation2Container , variation3Container ] ,
39
+ treatmentVariations : [ treatment1Container , treatment2Container , treatment3Container ] ,
40
40
} ;
41
41
getStringAssignmentSpy = jest . spyOn ( client , 'getStringAssignment' ) ;
42
42
loggerWarnSpy = jest . spyOn ( applicationLogger . logger , 'warn' ) ;
@@ -47,15 +47,15 @@ describe('getExperimentContainer', () => {
47
47
loggerWarnSpy . mockRestore ( ) ;
48
48
} ) ;
49
49
50
- it ( 'should return the right container when a variation is assigned' , async ( ) => {
51
- jest . spyOn ( client , 'getStringAssignment' ) . mockReturnValue ( 'variation -2' ) ;
50
+ it ( 'should return the right container when a treatment variation is assigned' , async ( ) => {
51
+ jest . spyOn ( client , 'getStringAssignment' ) . mockReturnValue ( 'treatment -2' ) ;
52
52
expect ( client . getExperimentContainer ( flagExperiment , 'subject-key' , { } ) ) . toEqual (
53
- variation2Container ,
53
+ treatment2Container ,
54
54
) ;
55
55
56
- jest . spyOn ( client , 'getStringAssignment' ) . mockReturnValue ( 'variation -3' ) ;
56
+ jest . spyOn ( client , 'getStringAssignment' ) . mockReturnValue ( 'treatment -3' ) ;
57
57
expect ( client . getExperimentContainer ( flagExperiment , 'subject-key' , { } ) ) . toEqual (
58
- variation3Container ,
58
+ treatment3Container ,
59
59
) ;
60
60
} ) ;
61
61
@@ -75,8 +75,8 @@ describe('getExperimentContainer', () => {
75
75
expect ( loggerWarnSpy ) . toHaveBeenCalled ( ) ;
76
76
} ) ;
77
77
78
- it ( 'should default to the control container if an out-of-bounds variation is assigned' , async ( ) => {
79
- jest . spyOn ( client , 'getStringAssignment' ) . mockReturnValue ( 'variation -9' ) ;
78
+ it ( 'should default to the control container if an out-of-bounds treatment variation is assigned' , async ( ) => {
79
+ jest . spyOn ( client , 'getStringAssignment' ) . mockReturnValue ( 'treatment -9' ) ;
80
80
expect ( client . getExperimentContainer ( flagExperiment , 'subject-key' , { } ) ) . toEqual (
81
81
controlContainer ,
82
82
) ;
0 commit comments