Skip to content

Commit

Permalink
Fix analytics test warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed Oct 1, 2024
1 parent d59563a commit a1a0869
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/analytics/testing/get-fake-firebase-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
}

0 comments on commit a1a0869

Please sign in to comment.