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

feat(integration-karma): feature flag support #1482

Merged
merged 15 commits into from
Sep 1, 2019

Conversation

ekashida
Copy link
Member

Details

Adds feature flag support to karma integration tests.

Does this PR introduce breaking changes?

  • No, it does not introduce breaking changes.

@ekashida
Copy link
Member Author

See commit 6c4b706 for an example of how to enable a feature flag.

Copy link
Contributor

@caridy caridy left a 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!

@caridy
Copy link
Contributor

caridy commented Aug 30, 2019

just look at the failures before merging this

@ekashida
Copy link
Member Author

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;
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, good!

@ekashida ekashida merged commit e69cee2 into master Sep 1, 2019
@ekashida ekashida deleted the ekashida/feature-flags-integration-karma branch September 1, 2019 23:26
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.

2 participants