Skip to content

Commit 9b92abb

Browse files
Fix build
1 parent 6dca9b0 commit 9b92abb

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

packages/storage/test/unit/reference.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { Provider } from '@firebase/component';
3232
/* eslint-disable @typescript-eslint/no-floating-promises */
3333
function makeFakeService(
3434
app: FirebaseApp,
35-
authProvider: Provider<FirebaseAuthInternal>,
35+
authProvider: Provider<'auth-internal'>,
3636
sendHook: SendHook
3737
): Service {
3838
return new Service(app, authProvider, testShared.makePool(sendHook));

packages/storage/test/unit/testshared.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import * as type from '../../src/implementation/type';
2222
import { Headers, XhrIo } from '../../src/implementation/xhrio';
2323
import { XhrIoPool } from '../../src/implementation/xhriopool';
2424
import { SendHook, StringHeaders, TestingXhrIo } from './xhrio';
25-
import { FirebaseAuthInternal } from '@firebase/auth-interop-types';
25+
import { FirebaseAuthTokenData } from '@firebase/auth-interop-types';
2626
import {
2727
Provider,
2828
ComponentContainer,
@@ -36,7 +36,7 @@ export const fakeApp = makeFakeApp();
3636
export const fakeAuthProvider = makeFakeAuthProvider({
3737
accessToken: authToken
3838
});
39-
export const emptyAuthProvider = new Provider<FirebaseAuthInternal>(
39+
export const emptyAuthProvider = new Provider<'auth-internal'>(
4040
'auth-internal',
4141
new ComponentContainer('storage-container')
4242
);
@@ -53,23 +53,24 @@ export function makeFakeApp(bucketArg?: string): FirebaseApp {
5353
}
5454

5555
export function makeFakeAuthProvider(
56-
token: {} | null
57-
): Provider<FirebaseAuthInternal> {
56+
token: FirebaseAuthTokenData | null
57+
): Provider<'auth-internal'> {
5858
const provider = new Provider(
5959
'auth-internal',
6060
new ComponentContainer('storage-container')
6161
);
6262
provider.setComponent(
6363
new Component(
6464
'auth-internal',
65-
() => ({
66-
getToken: async () => token
67-
}),
65+
(() => {
66+
getToken: () => Promise.resolve(token);
67+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
68+
}) as any,
6869
ComponentType.PRIVATE
6970
)
7071
);
7172

72-
return provider as Provider<FirebaseAuthInternal>;
73+
return provider as Provider<'auth-internal'>;
7374
}
7475

7576
export function makePool(sendHook: SendHook | null): XhrIoPool {

0 commit comments

Comments
 (0)