FLUTTER ECOSYSTEM

google_sign_in_mocks

Mocks for Google Sign In. Use this package with `firebase_auth_mocks` to write unit tests involving Firebase Authentication.

Latest version
0.4.1
30-day downloads
14.4K
Likes
34
Pub points
150

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

A testing package that provides mock implementations for Google Sign In, enabling developers to simulate authentication flows without requiring actual Google accounts. It integrates seamlessly with firebase_auth_mocks, making it ideal for writing reliable unit tests for Firebase Authentication logic in Flutter apps. The mocks support all major platforms including Android, iOS, Web, and macOS, ensuring consistent test behavior across environments.

Use cases
  • Unit testing Firebase Auth with Google Sign In
  • Simulating login/logout flows in tests
  • Testing app behavior after Google Sign In
  • Validating state changes triggered by authentication
  • Ensuring platform-agnostic test reliability
Key features
  • Mock GoogleSignIn class with configurable responses
  • Integration with firebase_auth_mocks
  • Supports all major platforms
  • Easy setup for test environments
  • No external dependencies during testing
Suitable for
  • Flutter developers writing unit tests
  • Teams using Firebase Authentication
  • Test-driven development workflows
  • Cross-platform app testing
  • CI/CD pipelines requiring stable test runs
Considerations
  • Not for production use
  • Requires firebase_auth_mocks for full functionality
  • Mock behavior must be explicitly defined in tests
  • Limited to sign-in simulation, not full OAuth flow
  • Does not handle real Google account interactions
Supported platformsAndroidiOSWebmacOS

Install package

flutter pub add google_sign_in_mocks

Categories

Source repository

Related projects

No data available yet.