Skip to content

Commit dbb1f22

Browse files
remove unit tests involving wrong requested variable type
1 parent 8089dcf commit dbb1f22

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

packages/optimizely-sdk/lib/optimizely/index.tests.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3993,29 +3993,29 @@ describe('lib/optimizely', function() {
39933993
});
39943994
});
39953995

3996-
it('returns null from getFeatureVariable when called with a non-boolean variable', function() {
3997-
var result = optlyInstance.getFeatureVariable('test_feature_for_experiment', 'button_width', 'user1');
3998-
assert.strictEqual(result, null);
3999-
sinon.assert.calledWith(createdLogger.log, LOG_LEVEL.WARNING, 'OPTIMIZELY: Requested variable type "boolean", but variable is of type "double". Use correct API to retrieve value. Returning None.');
4000-
});
4001-
4002-
it('returns null from getFeatureVariable when called with a non-double variable', function() {
4003-
var result = optlyInstance.getFeatureVariable('test_feature_for_experiment', 'is_button_animated', 'user1');
4004-
assert.strictEqual(result, null);
4005-
sinon.assert.calledWith(createdLogger.log, LOG_LEVEL.WARNING, 'OPTIMIZELY: Requested variable type "double", but variable is of type "boolean". Use correct API to retrieve value. Returning None.');
4006-
});
4007-
4008-
it('returns null from getFeatureVariable when called with a non-integer variable', function() {
4009-
var result = optlyInstance.getFeatureVariable('test_feature_for_experiment', 'button_width', 'user1');
4010-
assert.strictEqual(result, null);
4011-
sinon.assert.calledWith(createdLogger.log, LOG_LEVEL.WARNING, 'OPTIMIZELY: Requested variable type "integer", but variable is of type "double". Use correct API to retrieve value. Returning None.');
4012-
});
4013-
4014-
it('returns null from getFeatureVariable when called with a non-string variable', function() {
4015-
var result = optlyInstance.getFeatureVariable('test_feature_for_experiment', 'num_buttons', 'user1');
4016-
assert.strictEqual(result, null);
4017-
sinon.assert.calledWith(createdLogger.log, LOG_LEVEL.WARNING, 'OPTIMIZELY: Requested variable type "string", but variable is of type "integer". Use correct API to retrieve value. Returning None.');
4018-
});
3996+
// it('returns null from getFeatureVariable when called with a non-boolean variable', function() {
3997+
// var result = optlyInstance.getFeatureVariable('test_feature_for_experiment', 'button_width', 'user1');
3998+
// assert.strictEqual(result, null);
3999+
// sinon.assert.calledWith(createdLogger.log, LOG_LEVEL.WARNING, 'OPTIMIZELY: Requested variable type "boolean", but variable is of type "double". Use correct API to retrieve value. Returning None.');
4000+
// });
4001+
4002+
// it('returns null from getFeatureVariable when called with a non-double variable', function() {
4003+
// var result = optlyInstance.getFeatureVariable('test_feature_for_experiment', 'is_button_animated', 'user1');
4004+
// assert.strictEqual(result, null);
4005+
// sinon.assert.calledWith(createdLogger.log, LOG_LEVEL.WARNING, 'OPTIMIZELY: Requested variable type "double", but variable is of type "boolean". Use correct API to retrieve value. Returning None.');
4006+
// });
4007+
4008+
// it('returns null from getFeatureVariable when called with a non-integer variable', function() {
4009+
// var result = optlyInstance.getFeatureVariable('test_feature_for_experiment', 'button_width', 'user1');
4010+
// assert.strictEqual(result, null);
4011+
// sinon.assert.calledWith(createdLogger.log, LOG_LEVEL.WARNING, 'OPTIMIZELY: Requested variable type "integer", but variable is of type "double". Use correct API to retrieve value. Returning None.');
4012+
// });
4013+
4014+
// it('returns null from getFeatureVariable when called with a non-string variable', function() {
4015+
// var result = optlyInstance.getFeatureVariable('test_feature_for_experiment', 'num_buttons', 'user1');
4016+
// assert.strictEqual(result, null);
4017+
// sinon.assert.calledWith(createdLogger.log, LOG_LEVEL.WARNING, 'OPTIMIZELY: Requested variable type "string", but variable is of type "integer". Use correct API to retrieve value. Returning None.');
4018+
// });
40194019

40204020
it('returns null from getFeatureVariable if user id is null', function() {
40214021
var result = optlyInstance.getFeatureVariable('test_feature_for_experiment', 'is_button_animated', null, { test_attribute: 'test_value' });

0 commit comments

Comments
 (0)