@@ -8,6 +8,8 @@ sentryTest('Logs and returns if isEnabled does not match expected signature', as
88 if ( shouldSkipFeatureFlagsTest ( ) ) {
99 sentryTest . skip ( ) ;
1010 }
11+ const bundleKey = process . env . PW_BUNDLE || '' ;
12+ const hasDebug = ! bundleKey . includes ( '_min' ) ;
1113
1214 await page . route ( 'https://dsn.ingest.sentry.io/**/*' , route => {
1315 return route . fulfill ( {
@@ -39,17 +41,19 @@ sentryTest('Logs and returns if isEnabled does not match expected signature', as
3941 expect ( results ) . toEqual ( [ 'my-feature' , 999 , { } ] ) ;
4042
4143 // Expected error logs.
42- expect ( errorLogs ) . toEqual (
43- expect . arrayContaining ( [
44- expect . stringContaining (
45- '[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: my-feature (string), result: my-feature (string)' ,
46- ) ,
47- expect . stringContaining (
48- '[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: 999 (number), result: 999 (number)' ,
49- ) ,
50- expect . stringContaining (
51- '[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: [object Object] (object), result: [object Object] (object)' ,
52- ) ,
53- ] ) ,
54- ) ;
44+ if ( hasDebug ) {
45+ expect ( errorLogs ) . toEqual (
46+ expect . arrayContaining ( [
47+ expect . stringContaining (
48+ '[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: my-feature (string), result: my-feature (string)' ,
49+ ) ,
50+ expect . stringContaining (
51+ '[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: 999 (number), result: 999 (number)' ,
52+ ) ,
53+ expect . stringContaining (
54+ '[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: [object Object] (object), result: [object Object] (object)' ,
55+ ) ,
56+ ] ) ,
57+ ) ;
58+ }
5559} ) ;
0 commit comments