From 940f4627fb3fa4542ec423940208a771bf5120b4 Mon Sep 17 00:00:00 2001 From: fayyazarshad Date: Wed, 8 Jul 2020 20:31:02 +0500 Subject: [PATCH] update logs as per python --- .../lib/core/decision_service/index.tests.js | 36 +++---------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/packages/optimizely-sdk/lib/core/decision_service/index.tests.js b/packages/optimizely-sdk/lib/core/decision_service/index.tests.js index a0fbe22b9..1769e16f4 100644 --- a/packages/optimizely-sdk/lib/core/decision_service/index.tests.js +++ b/packages/optimizely-sdk/lib/core/decision_service/index.tests.js @@ -617,7 +617,7 @@ describe('lib/core/decision_service', function() { ); assert.isTrue(__audienceEvaluateSpy.alwaysReturned(false)); - assert.strictEqual(3, mockLogger.log.callCount); + assert.strictEqual(2, mockLogger.log.callCount); assert.strictEqual( mockLogger.log.args[0][1], 'DECISION_SERVICE: Evaluating audiences for experiment "testExperimentWithAudiences": ["11154"].' @@ -626,10 +626,6 @@ describe('lib/core/decision_service', function() { mockLogger.log.args[1][1], 'DECISION_SERVICE: Audiences for experiment testExperimentWithAudiences collectively evaluated to FALSE.' ); - assert.strictEqual( - mockLogger.log.args[2][1], - 'DECISION_SERVICE: User testUser does not meet conditions to be in experiment testExperimentWithAudiences.' - ); }); it('should return false when audience conditions are not met', function() { @@ -645,7 +641,7 @@ describe('lib/core/decision_service', function() { ); assert.isTrue(__audienceEvaluateSpy.alwaysReturned(false)); - assert.strictEqual(3, mockLogger.log.callCount); + assert.strictEqual(2, mockLogger.log.callCount); assert.strictEqual( mockLogger.log.args[0][1], 'DECISION_SERVICE: Evaluating audiences for experiment "testExperimentWithAudiences": ["11154"].' @@ -654,10 +650,6 @@ describe('lib/core/decision_service', function() { mockLogger.log.args[1][1], 'DECISION_SERVICE: Audiences for experiment testExperimentWithAudiences collectively evaluated to FALSE.' ); - assert.strictEqual( - mockLogger.log.args[2][1], - 'DECISION_SERVICE: User testUser does not meet conditions to be in experiment testExperimentWithAudiences.' - ); }); }); @@ -1380,7 +1372,7 @@ describe('lib/core/decision_service', function() { sinon.assert.calledWithExactly( mockLogger.log, LOG_LEVEL.DEBUG, - 'DECISION_SERVICE: User user1 is not in rollout of feature test_feature_for_experiment.' + 'DECISION_SERVICE: There is no rollout of feature test_feature_for_experiment.' ); }); }); @@ -1466,7 +1458,7 @@ describe('lib/core/decision_service', function() { sinon.assert.calledWithExactly( mockLogger.log, LOG_LEVEL.DEBUG, - 'DECISION_SERVICE: User user1 is not in rollout of feature feature_with_group.' + 'BUCKETER: Assigned experiment bucket 593 to user user1.' ); }); @@ -1635,11 +1627,6 @@ describe('lib/core/decision_service', function() { LOG_LEVEL.DEBUG, 'DECISION_SERVICE: User user1 bucketed into targeting rule 1.' ); - sinon.assert.calledWithExactly( - mockLogger.log, - LOG_LEVEL.DEBUG, - 'DECISION_SERVICE: User user1 is in rollout of feature test_feature.' - ); }); }); @@ -1759,11 +1746,6 @@ describe('lib/core/decision_service', function() { LOG_LEVEL.DEBUG, 'DECISION_SERVICE: User user1 bucketed into everyone targeting rule.' ); - sinon.assert.calledWithExactly( - mockLogger.log, - LOG_LEVEL.DEBUG, - 'DECISION_SERVICE: User user1 is in rollout of feature test_feature.' - ); }); }); @@ -1785,11 +1767,6 @@ describe('lib/core/decision_service', function() { LOG_LEVEL.DEBUG, 'DECISION_SERVICE: User user1 does not meet conditions for targeting rule 1.' ); - sinon.assert.calledWithExactly( - mockLogger.log, - LOG_LEVEL.DEBUG, - 'DECISION_SERVICE: User user1 is not in rollout of feature test_feature.' - ); }); }); @@ -2013,11 +1990,6 @@ describe('lib/core/decision_service', function() { LOG_LEVEL.DEBUG, 'DECISION_SERVICE: User user1 bucketed into everyone targeting rule.' ); - sinon.assert.calledWithExactly( - mockLogger.log, - LOG_LEVEL.DEBUG, - 'DECISION_SERVICE: User user1 is in rollout of feature shared_feature.' - ); }); });