Skip to content

refactor(common): use FirebaseEnv for parameter resolution#223

Open
Yusufihsangorgel wants to merge 1 commit into
firebase:mainfrom
Yusufihsangorgel:refactor/params-firebase-env
Open

refactor(common): use FirebaseEnv for parameter resolution#223
Yusufihsangorgel wants to merge 1 commit into
firebase:mainfrom
Yusufihsangorgel:refactor/params-firebase-env

Conversation

@Yusufihsangorgel

Copy link
Copy Markdown

Summary

  • route parameter environment lookups through FirebaseEnv
  • add unit coverage for mocked environment resolution across parameter types

ListParam and EnumListParam already use this interface. Moving the
remaining parameter classes to the same seam keeps production resolution
unchanged while making their runtime and deployment paths unit-testable with
FirebaseEnv.mockEnvironment.

Fixes #221.

Testing

  • dart test test/unit
  • dart analyze --fatal-infos lib/src/common/params.dart test/unit/params_test.dart
  • dart format --output=none --set-exit-if-changed .

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors parameter resolution in lib/src/common/params.dart to use FirebaseEnv instead of directly accessing Platform.environment. This decouples the environment variable lookup and allows for easier mocking. Corresponding unit tests have been added in test/unit/params_test.dart to verify parameter resolution with mocked environments. I have no feedback to provide as there are no review comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(common): migrate all parameter classes to use FirebaseEnv for consistent environment resolution and testability

1 participant