Skip to content

Commit d28343d

Browse files
committed
PR feedback
1 parent e5f0659 commit d28343d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

packages-exp/auth-exp/src/core/util/popup.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ import * as sinon from 'sinon';
2020
import * as sinonChai from 'sinon-chai';
2121

2222
import { FirebaseError } from '@firebase/util';
23+
import * as utils from '@firebase/util';
2324

24-
import { _open, _uaGetter, AuthPopup } from './popup';
25+
import { _open, AuthPopup } from './popup';
2526

2627
use(sinonChai);
2728

@@ -30,7 +31,7 @@ describe('src/core/util/popup', () => {
3031
let popupStub: sinon.SinonStubbedInstance<Window>;
3132

3233
function setUA(ua: string): void {
33-
sinon.stub(_uaGetter, 'getUA').returns(ua);
34+
sinon.stub(utils, 'getUA').returns(ua);
3435
}
3536

3637
function windowTarget(): string {

packages-exp/auth-exp/src/core/util/popup.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ export class AuthPopup {
4848
}
4949
}
5050

51-
/** Wrapper so that we can stub the UA in tests */
52-
export const _uaGetter = {
53-
getUA
54-
};
55-
5651
export function _open(
5752
appName: string,
5853
url?: string,
@@ -74,7 +69,7 @@ export function _open(
7469

7570
// Chrome iOS 7 and 8 is returning an undefined popup win when target is
7671
// specified, even though the popup is not necessarily blocked.
77-
const ua = _uaGetter.getUA().toLowerCase();
72+
const ua = getUA().toLowerCase();
7873

7974
if (name) {
8075
target = _isChromeIOS(ua) ? TARGET_BLANK : name;

0 commit comments

Comments
 (0)