Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make RemoteConfigFeatureFlagToolsViewModelTests resistant to adding new features #1930

Merged
merged 1 commit into from Feb 5, 2024

Conversation

amy-at-kickstarter
Copy link
Contributor

📲 What

This is a follow up to my PR #1924, making one more test future-proof.

🤔 Why

Adding feature flags is unnecessarily difficult, requiring a lot of copy-paste. This is one more place we shouldn't have to paste a new flag.

]

for feature in RemoteConfigFeature.allCases {
let trueOrFalse = feature.rawValue.hashValue % 2 == 1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is so each flag will get a stable true or false value, but we don't have to keep adding them to this list.

Copy link
Contributor

@ifosli ifosli left a comment

Choose a reason for hiding this comment

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

I like it! Thanks for simplifying things!

@amy-at-kickstarter amy-at-kickstarter force-pushed the feat/adyer/cleaner-feature-flags-pt-2 branch from 9cda6c4 to ba6bbef Compare February 5, 2024 16:11
@amy-at-kickstarter amy-at-kickstarter force-pushed the feat/adyer/cleaner-feature-flags-pt-2 branch from ba6bbef to 0712545 Compare February 5, 2024 16:24
@amy-at-kickstarter amy-at-kickstarter merged commit 4faf311 into main Feb 5, 2024
6 checks passed
@amy-at-kickstarter amy-at-kickstarter deleted the feat/adyer/cleaner-feature-flags-pt-2 branch February 5, 2024 16:57
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.

None yet

3 participants