Skip to content

Commit

Permalink
feat: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed Oct 30, 2022
1 parent 005c760 commit c362065
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See this [issue](https://github.com/react-native-google-signin/google-signin/iss
- Support all 3 types of authentication methods (standard, with server-side validation or with offline access (aka server side access))
- Promise-based API consistent between Android and iOS
- Typings for TypeScript and Flow
- Mock of the native module for testing with Jest
- Native sign in buttons

## Requirements
Expand Down Expand Up @@ -325,6 +326,18 @@ Example `userInfo` which is returned after successful sign in.
}
```

## Jest module mock

If you use Jest for testing, you may need to mock the functionality of the native module. This library ships with a Jest mock that you can add to the `setupFiles` array in the Jest config.

By default, the mock behaves as if the calls were successful and returns mock user data.

```
"setupFiles": [
"./node_modules/@react-native-google-signin/google-signin/jest/build/setup.js"
],
```

## Want to contribute?

Check out the [contributor guide](docs/CONTRIBUTING.md)!
Expand Down

0 comments on commit c362065

Please sign in to comment.