-
Notifications
You must be signed in to change notification settings - Fork 83
Add feature toggleability at the variation level. #78
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
Conversation
assert.isFunction(callArgs[1]); | ||
sinon.assert.calledWith(createdLogger.log, LOG_LEVEL.INFO, 'OPTIMIZELY: Feature test_feature_for_experiment is enabled for user user1.'); | ||
}); | ||
it('returns true and dispatches an impression event', function() { |
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.
All of these test cases were actually just moved into the describe clause for when the variation is toggled ON on line 2495.
lib/optimizely/index.tests.js
Outdated
var result = optlyInstance.isFeatureEnabled('test_feature_for_experiment'); | ||
assert.strictEqual(result, false); | ||
sinon.assert.notCalled(eventDispatcher.dispatchEvent); | ||
describe('when the variation is toggled OFF', function() { |
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.
These are the new test cases being added
experiment: experiment, | ||
variation: variation, | ||
decisionSource: DECISION_SOURCES.ROLLOUT, | ||
describe('when the variation is toggled ON', function() { |
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.
These are also new test cases
it('returns true and does not dispatch an event', function() { | ||
var result = optlyInstance.isFeatureEnabled('test_feature', 'user1', { | ||
test_attribute: 'test_value', | ||
describe('when the variation is toggled OFF', function() { |
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.
New test cases
8a1d43b
to
d4c09d9
Compare
build |
3 similar comments
build |
build |
build |
This introduces toggleability for a feature flag at the variation level.