Skip to content

Commit f9a0307

Browse files
committed
save
1 parent b64f752 commit f9a0307

File tree

3 files changed

+15
-44
lines changed

3 files changed

+15
-44
lines changed

lib/core/decision_service/index.spec.ts

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -263,38 +263,6 @@ describe('DecisionService', () => {
263263
});
264264

265265
describe('when a user profile service is provided', function() {
266-
// var fakeDecisionResponse = {
267-
// result: '111128',
268-
// reasons: [],
269-
// };
270-
// var userProfileServiceInstance = null;
271-
// var userProfileLookupStub;
272-
// var userProfileSaveStub;
273-
// var fakeDecisionWhitelistedVariation = {
274-
// result: null,
275-
// reasons: [],
276-
// }
277-
// beforeEach(function() {
278-
// userProfileServiceInstance = {
279-
// lookup: function() {},
280-
// save: function() {},
281-
// };
282-
283-
// decisionServiceInstance = createDecisionService({
284-
// logger: mockLogger,
285-
// userProfileService: userProfileServiceInstance,
286-
// });
287-
// userProfileLookupStub = sinon.stub(userProfileServiceInstance, 'lookup');
288-
// userProfileSaveStub = sinon.stub(userProfileServiceInstance, 'save');
289-
// sinon.stub(decisionServiceInstance, 'getWhitelistedVariation').returns(fakeDecisionWhitelistedVariation);
290-
// });
291-
292-
// afterEach(function() {
293-
// userProfileServiceInstance.lookup.restore();
294-
// userProfileServiceInstance.save.restore();
295-
// decisionServiceInstance.getWhitelistedVariation.restore();
296-
// });
297-
298266
beforeEach(() => {
299267
mockBucket.mockClear();
300268
});
@@ -593,8 +561,6 @@ describe('DecisionService', () => {
593561
expect(logger?.error).toHaveBeenCalledWith(USER_PROFILE_SAVE_ERROR, 'decision_service_user', 'I am an error');
594562
});
595563

596-
597-
// describe('when passing `attributes.$opt_experiment_bucket_map`', function() {
598564
it('should respect $opt_experiment_bucket_map attribute over the userProfileService for the matching experiment id', function() {
599565
const { decisionService, userProfileService, logger } = getDecisionService({ userProfileService: true, logger: true });
600566

@@ -721,4 +687,9 @@ describe('DecisionService', () => {
721687
});
722688
});
723689
});
690+
691+
const featureTestData
692+
describe('getVariationForFeature', () => {
693+
694+
});
724695
});

lib/core/decision_service/index.tests.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -658,15 +658,15 @@ describe('lib/core/decision_service', function() {
658658
});
659659
});
660660

661-
describe('checkIfExperimentIsActive', function() {
662-
it('should return true if experiment is running', function() {
663-
assert.isTrue(decisionServiceInstance.checkIfExperimentIsActive(configObj, 'testExperiment'));
664-
});
665-
666-
it('should return false when experiment is not running', function() {
667-
assert.isFalse(decisionServiceInstance.checkIfExperimentIsActive(configObj, 'testExperimentNotRunning'));
668-
});
669-
});
661+
// describe('checkIfExperimentIsActive', function() {
662+
// it('should return true if experiment is running', function() {
663+
// assert.isTrue(decisionServiceInstance.checkIfExperimentIsActive(configObj, 'testExperiment'));
664+
// });
665+
666+
// it('should return false when experiment is not running', function() {
667+
// assert.isFalse(decisionServiceInstance.checkIfExperimentIsActive(configObj, 'testExperimentNotRunning'));
668+
// });
669+
// });
670670

671671
describe('checkIfUserIsInAudience', function() {
672672
var __audienceEvaluateSpy;

lib/optimizely/index.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ describe('lib/optimizely', function() {
262262
});
263263

264264
sinon.assert.calledWith(decisionService.createDecisionService, {
265-
userProfileService: null,
265+
userProfileService: undefined,
266266
logger: createdLogger,
267267
UNSTABLE_conditionEvaluators: undefined,
268268
});

0 commit comments

Comments
 (0)