Skip to content

Commit aecff4f

Browse files
committed
Fix annoying messages from heartbeat
1 parent 743cc34 commit aecff4f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/app-check/test/util.ts

Lines changed: 6 additions & 3 deletions
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, _addOrOverwriteComponent, _registerComponent } from '@firebase/app';
1919
import {
2020
GreCAPTCHA,
2121
GreCAPTCHATopLevel,
@@ -62,11 +62,14 @@ export function getFakeAppCheck(app: FirebaseApp): AppCheck {
6262

6363
export function getFullApp(): FirebaseApp {
6464
const app = initializeApp(fakeConfig);
65-
_registerComponent(
65+
_addOrOverwriteComponent(app,
66+
//@ts-ignore
6667
new Component(
6768
'heartbeat',
6869
() => {
69-
return {} as any;
70+
return {
71+
triggerHeartbeat: () => {}
72+
} as any;
7073
},
7174
ComponentType.PUBLIC
7275
)

0 commit comments

Comments
 (0)