@@ -1063,6 +1063,11 @@ describe('getConfigUrl function', () => {
1063
1063
describe ( 'EppoPrecomputedJSClient E2E test' , ( ) => {
1064
1064
let globalClient : EppoPrecomputedJSClient ;
1065
1065
let mockLogger : IAssignmentLogger ;
1066
+ const stringFlagMD5 = '7724c9cf3eeb7e9478d4c5d45d523db0' ;
1067
+ const booleanFlagMD5 = 'da342f2d2df9aa65fd422191c581d4dc' ;
1068
+ const numericFlagMD5 = 'ea3957393f8c54d09bb0800186480bae' ;
1069
+ const jsonFlagMD5 = '801c055015c6cf6710d486f099000fea' ;
1070
+ const integerFlagMD5 = 'eb4caea3db4e58836bda9830ee098291' ;
1066
1071
1067
1072
beforeAll ( async ( ) => {
1068
1073
global . fetch = jest . fn ( ( ) => {
@@ -1077,43 +1082,44 @@ describe('EppoPrecomputedJSClient E2E test', () => {
1077
1082
name : 'Test' ,
1078
1083
} ,
1079
1084
flags : {
1080
- 'string-flag' : {
1081
- allocationKey : 'allocation-123' ,
1082
- variationKey : 'variation-123' ,
1085
+ [ stringFlagMD5 ] : {
1086
+ flagKey : stringFlagMD5 ,
1087
+ allocationKey : base64Encode ( 'allocation-123' ) ,
1088
+ variationKey : base64Encode ( 'variation-123' ) ,
1083
1089
variationType : 'STRING' ,
1084
- variationValue : 'red' ,
1090
+ variationValue : base64Encode ( 'red' ) ,
1085
1091
extraLogging : { } ,
1086
1092
doLog : true ,
1087
1093
} ,
1088
- 'boolean-flag' : {
1089
- allocationKey : 'allocation-124' ,
1090
- variationKey : 'variation-124' ,
1094
+ [ booleanFlagMD5 ] : {
1095
+ allocationKey : base64Encode ( 'allocation-124' ) ,
1096
+ variationKey : base64Encode ( 'variation-124' ) ,
1091
1097
variationType : 'BOOLEAN' ,
1092
- variationValue : true ,
1098
+ variationValue : base64Encode ( ' true' ) ,
1093
1099
extraLogging : { } ,
1094
1100
doLog : true ,
1095
1101
} ,
1096
- 'numeric-flag' : {
1097
- allocationKey : 'allocation-126' ,
1098
- variationKey : 'variation-126' ,
1102
+ [ numericFlagMD5 ] : {
1103
+ allocationKey : base64Encode ( 'allocation-126' ) ,
1104
+ variationKey : base64Encode ( 'variation-126' ) ,
1099
1105
variationType : 'NUMERIC' ,
1100
- variationValue : 3.14 ,
1106
+ variationValue : base64Encode ( ' 3.14' ) ,
1101
1107
extraLogging : { } ,
1102
1108
doLog : true ,
1103
1109
} ,
1104
- 'integer-flag' : {
1105
- allocationKey : 'allocation-125' ,
1106
- variationKey : 'variation-125' ,
1110
+ [ integerFlagMD5 ] : {
1111
+ allocationKey : base64Encode ( 'allocation-125' ) ,
1112
+ variationKey : base64Encode ( 'variation-125' ) ,
1107
1113
variationType : 'INTEGER' ,
1108
- variationValue : 42 ,
1114
+ variationValue : base64Encode ( '42' ) ,
1109
1115
extraLogging : { } ,
1110
1116
doLog : true ,
1111
1117
} ,
1112
- 'json-flag' : {
1113
- allocationKey : 'allocation-127' ,
1114
- variationKey : 'variation-127' ,
1118
+ [ jsonFlagMD5 ] : {
1119
+ allocationKey : base64Encode ( 'allocation-127' ) ,
1120
+ variationKey : base64Encode ( 'variation-127' ) ,
1115
1121
variationType : 'JSON' ,
1116
- variationValue : '{"key": "value", "number": 123}' ,
1122
+ variationValue : base64Encode ( '{"key": "value", "number": 123}' ) ,
1117
1123
extraLogging : { } ,
1118
1124
doLog : true ,
1119
1125
} ,
@@ -1129,7 +1135,7 @@ describe('EppoPrecomputedJSClient E2E test', () => {
1129
1135
baseUrl : 'http://127.0.0.1:4000' ,
1130
1136
assignmentLogger : mockLogger ,
1131
1137
subjectKey : 'test-subject' ,
1132
- subjectAttributes : { attr1 : 'value1' } ,
1138
+ subjectAttributes : { categoricalAttributes : { attr1 : 'value1' } , numericAttributes : { } } ,
1133
1139
} ) ;
1134
1140
} ) ;
1135
1141
@@ -1205,7 +1211,7 @@ describe('EppoClient config', () => {
1205
1211
const retryManager = eventDispatcher [ 'retryManager' ] ;
1206
1212
const batchProcessor = eventDispatcher [ 'batchProcessor' ] ;
1207
1213
expect ( eventDispatcher [ 'deliveryIntervalMs' ] ) . toEqual ( 1 ) ;
1208
- expect ( batchProcessor [ 'batchSize' ] ) . toEqual ( 5 ) ;
1214
+ expect ( batchProcessor [ 'batchSize' ] ) . toEqual ( 100 ) ;
1209
1215
expect ( retryManager [ 'config' ] [ 'retryIntervalMs' ] ) . toEqual ( 2 ) ;
1210
1216
expect ( retryManager [ 'config' ] [ 'maxRetryDelayMs' ] ) . toEqual ( 3 ) ;
1211
1217
expect ( retryManager [ 'config' ] [ 'maxRetries' ] ) . toEqual ( 4 ) ;
0 commit comments