Skip to content

Commit 340738e

Browse files
committed
Removed dependency from tests as well where it was being used directly
1 parent 5dacfb8 commit 340738e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/optimizely-sdk/lib/core/decision_service/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ DecisionService.prototype.__saveUserProfile = function(experiment, variation, us
263263
}
264264

265265
try {
266-
var newBucketMap = fns.cloneJsonObject(experimentBucketMap);
266+
var newBucketMap = experimentBucketMap;
267267
newBucketMap[experiment.id] = {
268268
variation_id: variation.id
269269
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3792,7 +3792,7 @@ describe('lib/optimizely', function() {
37923792
describe('when the variation is missing the toggle', function() {
37933793
beforeEach(function() {
37943794
var experiment = optlyInstance.projectConfigManager.getConfig().experimentKeyMap.test_shared_feature;
3795-
var variation = fns.cloneJsonObject(experiment.variations[0]);
3795+
var variation = experiment.variations[0];
37963796
delete variation['featureEnabled'];
37973797
sandbox.stub(optlyInstance.decisionService, 'getVariationForFeature').returns({
37983798
experiment: experiment,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,7 @@ var unsupportedVersionConfig = {
20362036
};
20372037

20382038
var getUnsupportedVersionConfig = function() {
2039-
return fns.cloneJsonObject(unsupportedVersionConfig);
2039+
return unsupportedVersionConfig;
20402040
};
20412041

20422042
var typedAudiencesConfig = {
@@ -2437,7 +2437,7 @@ var typedAudiencesConfig = {
24372437
};
24382438

24392439
var getTypedAudiencesConfig = function() {
2440-
return fns.cloneJsonObject(typedAudiencesConfig);
2440+
return typedAudiencesConfig;
24412441
};
24422442

24432443
var typedAudiencesById = {
@@ -2575,7 +2575,7 @@ var mutexFeatureTestsConfig = {
25752575
};
25762576

25772577
var getMutexFeatureTestsConfig = function() {
2578-
return fns.cloneJsonObject(mutexFeatureTestsConfig);
2578+
return mutexFeatureTestsConfig;
25792579
};
25802580

25812581
module.exports = {

0 commit comments

Comments
 (0)