diff --git a/gapi.auth2/gapi.auth2-tests.ts b/gapi.auth2/gapi.auth2-tests.ts new file mode 100644 index 000000000..cbe6c0fd3 --- /dev/null +++ b/gapi.auth2/gapi.auth2-tests.ts @@ -0,0 +1,29 @@ +/// + +function test_init(){ + var auth = gapi.auth2.init(); +} + +function test_getAuthInstance(){ + gapi.auth2.init(); + var auth = gapi.auth2.getAuthInstance(); +} + +function test_render(){ + var success = (googleUser: gapi.auth2.GoogleUser): void => { + console.log(googleUser); + }; + var failure = (): void => { + console.log('Failure callback'); + }; + + gapi.signin2.render('testId', { + scope: 'some scope', + width: 250, + height: 50, + longtitle: true, + theme: 'dark', + onsuccess: success, + onfailure: failure + }); +}