File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
dev-packages/browser-integration-tests/suites/integrations/featureFlags/growthbook/onError/basic Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ sentryTest('GrowthBook onError: basic eviction/update and no async tasks', async
31
31
32
32
gb . __setOn ( 'feat3' , true ) ;
33
33
gb . isOn ( 'feat3' ) ; // update
34
+
35
+ // Test getFeatureValue with boolean values (should be captured)
36
+ gb . __setFeatureValue ( 'bool-feat' , true ) ;
37
+ gb . getFeatureValue ( 'bool-feat' , false ) ;
38
+
39
+ // Test getFeatureValue with non-boolean values (should be ignored)
40
+ gb . __setFeatureValue ( 'string-feat' , 'hello' ) ;
41
+ gb . getFeatureValue ( 'string-feat' , 'default' ) ;
42
+ gb . __setFeatureValue ( 'number-feat' , 42 ) ;
43
+ gb . getFeatureValue ( 'number-feat' , 0 ) ;
34
44
} , FLAG_BUFFER_SIZE ) ;
35
45
36
46
const reqPromise = waitForErrorRequest ( page ) ;
@@ -45,6 +55,7 @@ sentryTest('GrowthBook onError: basic eviction/update and no async tasks', async
45
55
}
46
56
expectedFlags . push ( { flag : `feat${ FLAG_BUFFER_SIZE + 1 } ` , result : true } ) ;
47
57
expectedFlags . push ( { flag : 'feat3' , result : true } ) ;
58
+ expectedFlags . push ( { flag : 'bool-feat' , result : true } ) ; // Only boolean getFeatureValue should be captured
48
59
49
60
expect ( values ) . toEqual ( expectedFlags ) ;
50
61
} ) ;
You can’t perform that action at this time.
0 commit comments