@@ -85,56 +85,56 @@ describe('autoInject via proxy configs', () => {
8585 } )
8686 } )
8787
88- describe ( 'boolean entries' , ( ) => {
89- it ( 'injects into runtimeConfig for posthog: true ' , ( ) => {
90- const registry : any = { posthog : true }
88+ describe ( 'empty object entries (env var driven) ' , ( ) => {
89+ it ( 'injects into runtimeConfig for posthog: {} ' , ( ) => {
90+ const registry : any = { posthog : { } }
9191 const rt = makeRuntimeConfig ( { posthog : { apiKey : '' } } )
9292
9393 autoInjectAll ( registry , rt , '/_proxy' )
9494
95- // After normalization, true becomes [{}] — both input and runtimeConfig get the value
95+ // After normalization, {} becomes [{}] — both input and runtimeConfig get the value
9696 expect ( registry . posthog [ 0 ] . apiHost ) . toBe ( '/_proxy/ph' )
9797 expect ( rt . public . scripts . posthog . apiHost ) . toBe ( '/_proxy/ph' )
9898 } )
9999
100- it ( 'uses EU prefix for posthog: true when runtime region is eu' , ( ) => {
101- const registry : any = { posthog : true }
100+ it ( 'uses EU prefix for posthog: {} when runtime region is eu' , ( ) => {
101+ const registry : any = { posthog : { } }
102102 const rt = makeRuntimeConfig ( { posthog : { apiKey : '' , region : 'eu' } } )
103103
104104 autoInjectAll ( registry , rt , '/_proxy' )
105105
106106 expect ( rt . public . scripts . posthog . apiHost ) . toBe ( '/_proxy/ph-eu' )
107107 } )
108108
109- it ( 'injects into runtimeConfig for plausibleAnalytics: true ' , ( ) => {
110- const registry : any = { plausibleAnalytics : true }
109+ it ( 'injects into runtimeConfig for plausibleAnalytics: {} ' , ( ) => {
110+ const registry : any = { plausibleAnalytics : { } }
111111 const rt = makeRuntimeConfig ( { plausibleAnalytics : { domain : '' } } )
112112
113113 autoInjectAll ( registry , rt , '/_proxy' )
114114
115115 expect ( rt . public . scripts . plausibleAnalytics . endpoint ) . toBe ( '/_proxy/plausible/api/event' )
116116 } )
117117
118- it ( 'injects into runtimeConfig for umamiAnalytics: true ' , ( ) => {
119- const registry : any = { umamiAnalytics : true }
118+ it ( 'injects into runtimeConfig for umamiAnalytics: {} ' , ( ) => {
119+ const registry : any = { umamiAnalytics : { } }
120120 const rt = makeRuntimeConfig ( { umamiAnalytics : { websiteId : '' } } )
121121
122122 autoInjectAll ( registry , rt , '/_proxy' )
123123
124124 expect ( rt . public . scripts . umamiAnalytics . hostUrl ) . toBe ( '/_proxy/umami' )
125125 } )
126126
127- it ( 'injects into runtimeConfig for rybbitAnalytics: true ' , ( ) => {
128- const registry : any = { rybbitAnalytics : true }
127+ it ( 'injects into runtimeConfig for rybbitAnalytics: {} ' , ( ) => {
128+ const registry : any = { rybbitAnalytics : { } }
129129 const rt = makeRuntimeConfig ( { rybbitAnalytics : { siteId : '' } } )
130130
131131 autoInjectAll ( registry , rt , '/_proxy' )
132132
133133 expect ( rt . public . scripts . rybbitAnalytics . analyticsHost ) . toBe ( '/_proxy/rybbit/api' )
134134 } )
135135
136- it ( 'injects into runtimeConfig for databuddyAnalytics: true ' , ( ) => {
137- const registry : any = { databuddyAnalytics : true }
136+ it ( 'injects into runtimeConfig for databuddyAnalytics: {} ' , ( ) => {
137+ const registry : any = { databuddyAnalytics : { } }
138138 const rt = makeRuntimeConfig ( { databuddyAnalytics : { clientId : '' } } )
139139
140140 autoInjectAll ( registry , rt , '/_proxy' )
@@ -185,7 +185,7 @@ describe('autoInject via proxy configs', () => {
185185
186186 describe ( 'custom proxyPrefix' , ( ) => {
187187 it ( 'uses custom prefix in computed values' , ( ) => {
188- const registry : any = { posthog : true }
188+ const registry : any = { posthog : { } }
189189 const rt = makeRuntimeConfig ( { posthog : { apiKey : '' } } )
190190
191191 autoInjectAll ( registry , rt , '/_analytics' )
0 commit comments