Skip to content

Commit 3c55563

Browse files
committed
test(functions): remove use of deprecated APIs in unit tests
1 parent 28471dc commit 3c55563

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/functions/__tests__/functions.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import {
1414
CheckV9DeprecationFunction,
1515
} from '../../app/lib/common/unitTestUtils';
1616

17+
import { getApp } from '../../app';
18+
1719
// @ts-ignore test
1820
import FirebaseModule from '../../app/lib/internal/FirebaseModule';
1921

@@ -120,7 +122,7 @@ describe('Cloud Functions', function () {
120122

121123
describe('Cloud Functions', function () {
122124
it('useFunctionsEmulator()', function () {
123-
const app = firebase.app();
125+
const app = getApp();
124126
const functions = app.functions();
125127
functionsRefV9Deprecation(
126128
() => connectFunctionsEmulator(functions, 'localhost', 8080),
@@ -130,7 +132,7 @@ describe('Cloud Functions', function () {
130132
});
131133

132134
it('httpsCallable()', function () {
133-
const app = firebase.app();
135+
const app = getApp();
134136
const functions = app.functions();
135137
functionsRefV9Deprecation(
136138
() => httpsCallable(functions, 'example'),
@@ -140,7 +142,7 @@ describe('Cloud Functions', function () {
140142
});
141143

142144
it('httpsCallableFromUrl()', function () {
143-
const app = firebase.app();
145+
const app = getApp();
144146
const functions = app.functions();
145147
functionsRefV9Deprecation(
146148
() => httpsCallableFromUrl(functions, 'https://example.com/example'),

0 commit comments

Comments
 (0)