-
Notifications
You must be signed in to change notification settings - Fork 392
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
feat(integration-karma): feature flag support #1482
Conversation
This reverts commit 6c4b706.
See commit 6c4b706 for an example of how to enable a feature flag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even better than I ever imagine this could work! great stuff... let's roll!
just look at the failures before merging this |
Refactored after discussion with @tariqrafique and @caridy. See commit ea8f0f6 for example of how to integration test flags in engine. |
} | ||
runtimeFlags[name] = false; | ||
function setFeatureFlag(name: string, value: FeatureFlag) { | ||
runtimeFlags[name] = value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably here we should validate that the name is a qualifying flag, and error out if it is not... at least in dev-mode to avoid typos and other things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flags are currently defined as variables so we would need to maintain a separate array of variable names, or do some refactoring so that flags are defines as entries in an object. The latter option would require a little work it sounds like it might be worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to do the above and this PR looks good otherwise, we can merge it for now to unblock the reactive setter changes and I can work on the flag changes a little later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, good!
Details
Adds feature flag support to karma integration tests.
Does this PR introduce breaking changes?
No, it does not introduce breaking changes.