Skip to content

Commit ac98914

Browse files
committed
Formatting
1 parent a75a309 commit ac98914

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,10 @@ describe('core/auth/auth_impl useEmulator', () => {
489489
sinon.restore();
490490

491491
// The DOM persists through tests; remove the banner if it is attached
492-
const banner = typeof document !== 'undefined' ? document.querySelector('.firebase-emulator-warning') : null;
492+
const banner =
493+
typeof document !== 'undefined'
494+
? document.querySelector('.firebase-emulator-warning')
495+
: null;
493496
if (banner) {
494497
banner.parentElement?.removeChild(banner);
495498
}
@@ -532,8 +535,10 @@ describe('core/auth/auth_impl useEmulator', () => {
532535
if (typeof document !== 'undefined') {
533536
const el = document.querySelector('.firebase-emulator-warning')!;
534537
expect(el).not.to.be.null;
535-
expect(el.textContent).to.eq('Running in emulator mode. ' +
536-
'Do not use with production credentials.');
538+
expect(el.textContent).to.eq(
539+
'Running in emulator mode. ' +
540+
'Do not use with production credentials.'
541+
);
537542
}
538543
});
539544

@@ -542,8 +547,8 @@ describe('core/auth/auth_impl useEmulator', () => {
542547
auth.useEmulator('http://localhost:2020');
543548
expect(console.info).to.have.been.calledWith(
544549
'WARNING: You are using the Auth Emulator,' +
545-
' which is intended for local testing only. Do not use with' +
546-
' production credentials.'
550+
' which is intended for local testing only. Do not use with' +
551+
' production credentials.'
547552
);
548553
});
549554

@@ -552,8 +557,8 @@ describe('core/auth/auth_impl useEmulator', () => {
552557
auth.useEmulator('http://localhost:2020', true);
553558
expect(console.info).to.have.been.calledWith(
554559
'WARNING: You are using the Auth Emulator,' +
555-
' which is intended for local testing only. Do not use with' +
556-
' production credentials.'
560+
' which is intended for local testing only. Do not use with' +
561+
' production credentials.'
557562
);
558563
if (typeof document !== 'undefined') {
559564
expect(document.querySelector('.firebase-emulator-warning')).to.be.null;

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,8 @@ function emitEmulatorWarning(disableBanner: boolean): void {
573573
function attachBanner(): void {
574574
const el = document.createElement('p');
575575
const sty = el.style;
576-
el.innerText = 'Running in emulator mode. Do not use with' +
577-
' production credentials.';
576+
el.innerText =
577+
'Running in emulator mode. Do not use with' + ' production credentials.';
578578
sty.position = 'fixed';
579579
sty.width = '100%';
580580
sty.backgroundColor = '#ffffff';
@@ -591,16 +591,20 @@ function emitEmulatorWarning(disableBanner: boolean): void {
591591

592592
if (typeof console !== 'undefined' && typeof console.info === 'function') {
593593
console.info(
594-
'WARNING: You are using the Auth Emulator,' +
595-
' which is intended for local testing only. Do not use with' +
596-
' production credentials.');
594+
'WARNING: You are using the Auth Emulator,' +
595+
' which is intended for local testing only. Do not use with' +
596+
' production credentials.'
597+
);
597598
}
598-
if (typeof window !== 'undefined' && typeof document !== 'undefined' && !disableBanner) {
599-
599+
if (
600+
typeof window !== 'undefined' &&
601+
typeof document !== 'undefined' &&
602+
!disableBanner
603+
) {
600604
if (document.readyState === 'loading') {
601605
window.addEventListener('DOMContentLoaded', attachBanner);
602606
} else {
603607
attachBanner();
604608
}
605609
}
606-
}
610+
}

0 commit comments

Comments
 (0)