File tree Expand file tree Collapse file tree 3 files changed +18
-12
lines changed
packages-exp/auth-exp/src/platform_browser/iframe Expand file tree Collapse file tree 3 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,10 @@ declare namespace gapi.iframes {
42
42
type Callback = ( iframe : Iframe ) => void ;
43
43
44
44
class Context {
45
- open ( options : Record < string , unknown > , callback ?: Callback ) : Promise < Iframe > ;
45
+ open (
46
+ options : Record < string , unknown > ,
47
+ callback ?: Callback
48
+ ) : Promise < Iframe > ;
46
49
}
47
50
48
51
class Iframe {
@@ -52,7 +55,10 @@ declare namespace gapi.iframes {
52
55
filter ?: IframesFilter
53
56
) : void ;
54
57
ping ( callback : SendCallback , data ?: unknown ) : Promise < unknown [ ] > ;
55
- restyle ( style : Record < string , string | boolean > , callback ?: SendCallback ) : Promise < unknown [ ] > ;
58
+ restyle (
59
+ style : Record < string , string | boolean > ,
60
+ callback ?: SendCallback
61
+ ) : Promise < unknown [ ] > ;
56
62
}
57
63
58
64
const CROSS_ORIGIN_IFRAMES_FILTER : IframesFilter ;
Original file line number Diff line number Diff line change @@ -48,21 +48,18 @@ describe('src/platform_browser/iframe/gapi', () => {
48
48
auth = await testAuth ( ) ;
49
49
} ) ;
50
50
51
- function makeGapi (
52
- result : unknown ,
53
- timesout = false
54
- ) : typeof gapi {
51
+ function makeGapi ( result : unknown , timesout = false ) : typeof gapi {
55
52
const callbackFn = timesout === false ? 'callback' : 'ontimeout' ;
56
- return {
53
+ return ( {
57
54
load : sinon
58
55
. stub ( )
59
56
. callsFake ( ( _name : string , params : Record < string , Function > ) =>
60
57
params [ callbackFn ] ( )
61
58
) ,
62
59
iframes : {
63
- getContext : ( ) => result as gapi . iframes . Context ,
60
+ getContext : ( ) => result as gapi . iframes . Context
64
61
}
65
- } as unknown as typeof gapi ;
62
+ } as unknown ) as typeof gapi ;
66
63
}
67
64
68
65
afterEach ( ( ) => {
Original file line number Diff line number Diff line change @@ -66,9 +66,12 @@ export async function _openIframe(auth: Auth): Promise<gapi.iframes.Iframe> {
66
66
setHideOnLeave : false
67
67
} ) ;
68
68
69
- const networkError = AUTH_ERROR_FACTORY . create ( AuthErrorCode . NETWORK_REQUEST_FAILED , {
70
- appName : auth . name
71
- } ) ;
69
+ const networkError = AUTH_ERROR_FACTORY . create (
70
+ AuthErrorCode . NETWORK_REQUEST_FAILED ,
71
+ {
72
+ appName : auth . name
73
+ }
74
+ ) ;
72
75
// Confirm iframe is correctly loaded.
73
76
// To fallback on failure, set a timeout.
74
77
const networkErrorTimer = AUTH_WINDOW . setTimeout ( ( ) => {
You can’t perform that action at this time.
0 commit comments