Skip to content

Commit a1a0869

Browse files
committed
Fix analytics test warnings
1 parent d59563a commit a1a0869

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

packages/analytics/testing/get-fake-firebase-services.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { FirebaseApp, initializeApp, _registerComponent } from '@firebase/app';
18+
import { FirebaseApp, initializeApp, _registerComponent, _addOrOverwriteComponent } from '@firebase/app';
1919
import { Component, ComponentType } from '@firebase/component';
2020
import { _FirebaseInstallationsInternal } from '@firebase/installations';
2121
import { AnalyticsService } from '../src/factory';
@@ -78,5 +78,18 @@ export function getFullApp(fakeAppParams?: {
7878
)
7979
);
8080
const app = initializeApp({ ...fakeConfig, ...fakeAppParams });
81+
_addOrOverwriteComponent(
82+
app,
83+
//@ts-ignore
84+
new Component(
85+
'heartbeat',
86+
() => {
87+
return {
88+
triggerHeartbeat: () => {}
89+
} as any;
90+
},
91+
ComponentType.PUBLIC
92+
)
93+
);
8194
return app;
8295
}

0 commit comments

Comments
 (0)