Skip to content

Commit 5745e24

Browse files
committed
prettier
1 parent 28a63eb commit 5745e24

File tree

2 files changed

+34
-18
lines changed

2 files changed

+34
-18
lines changed

packages-exp/auth-exp/src/core/auth/initialize.test.ts

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ import {
3131
import { isNode } from '@firebase/util';
3232

3333
import { expect } from 'chai';
34-
import { browserLocalPersistence, browserSessionPersistence, inMemoryPersistence } from '../../../internal';
34+
import {
35+
browserLocalPersistence,
36+
browserSessionPersistence,
37+
inMemoryPersistence
38+
} from '../../../internal';
3539

3640
import { AuthInternal } from '../../model/auth';
3741
import {
@@ -128,7 +132,8 @@ describe('core/auth/initialize', () => {
128132
}
129133
}
130134

131-
const fakePopupRedirectResolver: PopupRedirectResolver = FakePopupRedirectResolver;
135+
const fakePopupRedirectResolver: PopupRedirectResolver =
136+
FakePopupRedirectResolver;
132137

133138
before(() => {
134139
registerAuth(ClientPlatform.BROWSER);
@@ -204,7 +209,7 @@ describe('core/auth/initialize', () => {
204209
const auth = initializeAuth(fakeApp, {
205210
popupRedirectResolver: fakePopupRedirectResolver
206211
}) as AuthInternal;
207-
await ((auth as unknown) as _FirebaseService)._delete();
212+
await (auth as unknown as _FirebaseService)._delete();
208213
await auth._initializationPromise;
209214

210215
expect(auth._isInitialized).to.be.false;
@@ -221,38 +226,46 @@ describe('core/auth/initialize', () => {
221226
persistence: browserSessionPersistence,
222227
popupRedirectResolver: fakePopupRedirectResolver
223228
});
224-
expect(initializeAuth(fakeApp, {
225-
errorMap: prodErrorMap,
226-
persistence: browserSessionPersistence,
227-
popupRedirectResolver: fakePopupRedirectResolver
228-
})).to.equal(auth);
229+
expect(
230+
initializeAuth(fakeApp, {
231+
errorMap: prodErrorMap,
232+
persistence: browserSessionPersistence,
233+
popupRedirectResolver: fakePopupRedirectResolver
234+
})
235+
).to.equal(auth);
229236
});
230237

231238
it('should throw if called again with different params (popupRedirectResolver)', () => {
232239
initializeAuth(fakeApp, {
233240
popupRedirectResolver: fakePopupRedirectResolver
234241
});
235-
expect(() => initializeAuth(fakeApp, {
236-
popupRedirectResolver: undefined
237-
})).to.throw();
242+
expect(() =>
243+
initializeAuth(fakeApp, {
244+
popupRedirectResolver: undefined
245+
})
246+
).to.throw();
238247
});
239248

240249
it('should throw if called again with different params (errorMap)', () => {
241250
initializeAuth(fakeApp, {
242251
errorMap: prodErrorMap
243252
});
244-
expect(() => initializeAuth(fakeApp, {
245-
errorMap: debugErrorMap
246-
})).to.throw();
253+
expect(() =>
254+
initializeAuth(fakeApp, {
255+
errorMap: debugErrorMap
256+
})
257+
).to.throw();
247258
});
248259

249260
it('should throw if called again with different params (persistence)', () => {
250261
initializeAuth(fakeApp, {
251262
persistence: [browserLocalPersistence, browserSessionPersistence]
252263
});
253-
expect(() => initializeAuth(fakeApp, {
254-
persistence: [browserSessionPersistence, browserLocalPersistence]
255-
})).to.throw();
264+
expect(() =>
265+
initializeAuth(fakeApp, {
266+
persistence: [browserSessionPersistence, browserLocalPersistence]
267+
})
268+
).to.throw();
256269
});
257270
});
258271
});

packages-exp/auth-exp/src/core/auth/initialize.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ export function initializeAuth(app: FirebaseApp, deps?: Dependencies): Auth {
5959
if (
6060
initialOptions.errorMap === deps?.errorMap &&
6161
initialOptions.popupRedirectResolver === deps?.popupRedirectResolver &&
62-
deepEqual(initialOptions.persistence as object, deps?.persistence as object)
62+
deepEqual(
63+
initialOptions.persistence as object,
64+
deps?.persistence as object
65+
)
6366
) {
6467
return auth;
6568
} else {

0 commit comments

Comments
 (0)