Skip to content

Commit

Permalink
chore: self-review
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed Sep 1, 2024
1 parent cda6c25 commit aa13740
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ describe('GoogleSignin', () => {
expect(await GoogleSignin.signIn()).toStrictEqual(
mockGoogleSignInResponse,
);
expect(await GoogleSignin.signInSilently()).toStrictEqual(
mockGoogleSignInResponse,
);
expect(GoogleSignin.getCurrentUser()).toStrictEqual(mockUserInfo);
expect(await GoogleSignin.signOut()).toBeNull();
expect(GoogleSigninButton).toBeInstanceOf(Function);
Expand Down
2 changes: 1 addition & 1 deletion src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const isErrorWithCode = (error: any): error is NativeModuleError => {
* ```
*/
export function isCancelledResponse(
response: SignInResponse, // should this signature be included too?
response: SignInResponse,
): response is CancelledResponse {
return response.type === 'cancelled';
}
Expand Down
2 changes: 1 addition & 1 deletion src/signIn/GoogleSignin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async function addScopes(
}
// on Android, the user returned in onActivityResult() will contain only the scopes added, not the ones present previously
// we work around it by calling signInSilently() which returns the user object with all scopes
// @ts-expect-error `no_saved_credential_found` is not possible here, because we just added scopes
// @ts-expect-error `noSavedCredentialFound` is not possible here, because we just added scopes
return signInSilently();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/signIn/GoogleSignin.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
} from '../types';
import { statusCodes } from '../errors/errorCodes.web';
const errorMessage =
'RNGoogleSignIn: you are calling a not-implemented method on web platform. Web support is only available to sponsors.' +
'RNGoogleSignIn: you are calling a not-implemented method on web platform. Web support is only available to sponsors. \n' +
'If you are a sponsor, please follow the installation instructions carefully to obtain the implementation.';

const logNotImplementedError = () => {
Expand Down

0 comments on commit aa13740

Please sign in to comment.