File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
packages-exp/auth-exp/src/core/util Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ import * as sinon from 'sinon';
20
20
import * as sinonChai from 'sinon-chai' ;
21
21
22
22
import { FirebaseError } from '@firebase/util' ;
23
+ import * as utils from '@firebase/util' ;
23
24
24
- import { _open , _uaGetter , AuthPopup } from './popup' ;
25
+ import { _open , AuthPopup } from './popup' ;
25
26
26
27
use ( sinonChai ) ;
27
28
@@ -30,7 +31,7 @@ describe('src/core/util/popup', () => {
30
31
let popupStub : sinon . SinonStubbedInstance < Window > ;
31
32
32
33
function setUA ( ua : string ) : void {
33
- sinon . stub ( _uaGetter , 'getUA' ) . returns ( ua ) ;
34
+ sinon . stub ( utils , 'getUA' ) . returns ( ua ) ;
34
35
}
35
36
36
37
function windowTarget ( ) : string {
Original file line number Diff line number Diff line change @@ -48,11 +48,6 @@ export class AuthPopup {
48
48
}
49
49
}
50
50
51
- /** Wrapper so that we can stub the UA in tests */
52
- export const _uaGetter = {
53
- getUA
54
- } ;
55
-
56
51
export function _open (
57
52
appName : string ,
58
53
url ?: string ,
@@ -74,7 +69,7 @@ export function _open(
74
69
75
70
// Chrome iOS 7 and 8 is returning an undefined popup win when target is
76
71
// specified, even though the popup is not necessarily blocked.
77
- const ua = _uaGetter . getUA ( ) . toLowerCase ( ) ;
72
+ const ua = getUA ( ) . toLowerCase ( ) ;
78
73
79
74
if ( name ) {
80
75
target = _isChromeIOS ( ua ) ? TARGET_BLANK : name ;
You can’t perform that action at this time.
0 commit comments