From a1a0869dba134888c216eaa9feacc82cafa07480 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Tue, 1 Oct 2024 11:33:25 -0700 Subject: [PATCH] Fix analytics test warnings --- .../testing/get-fake-firebase-services.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/analytics/testing/get-fake-firebase-services.ts b/packages/analytics/testing/get-fake-firebase-services.ts index 596e431e0b2..6c510c0adb9 100644 --- a/packages/analytics/testing/get-fake-firebase-services.ts +++ b/packages/analytics/testing/get-fake-firebase-services.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { FirebaseApp, initializeApp, _registerComponent } from '@firebase/app'; +import { FirebaseApp, initializeApp, _registerComponent, _addOrOverwriteComponent } from '@firebase/app'; import { Component, ComponentType } from '@firebase/component'; import { _FirebaseInstallationsInternal } from '@firebase/installations'; import { AnalyticsService } from '../src/factory'; @@ -78,5 +78,18 @@ export function getFullApp(fakeAppParams?: { ) ); const app = initializeApp({ ...fakeConfig, ...fakeAppParams }); + _addOrOverwriteComponent( + app, + //@ts-ignore + new Component( + 'heartbeat', + () => { + return { + triggerHeartbeat: () => {} + } as any; + }, + ComponentType.PUBLIC + ) + ); return app; }