Skip to content

Commit f75c4fb

Browse files
authored
chore: Remove console.log statements from tests (#588)
Summary: Remove console.log calls that are cluttering the test output. Test plan: Run tests
1 parent c79e772 commit f75c4fb

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

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

-2
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ describe('lib/core/audience_evaluator', function() {
196196
var userAttributes = { device_model: 'android' };
197197
var result = audienceEvaluator.evaluate(['or', '1'], audiencesById, userAttributes);
198198
sinon.assert.calledOnce(customAttributeConditionEvaluator.evaluate);
199-
console.log('args: ', customAttributeConditionEvaluator.evaluate.firstCall.args);
200199
sinon.assert.calledWithExactly(
201200
customAttributeConditionEvaluator.evaluate,
202201
iphoneUserAudience.conditions[1],
@@ -273,7 +272,6 @@ describe('lib/core/audience_evaluator', function() {
273272
var userAttributes = { device_model: 'android' };
274273
var result = audienceEvaluator.evaluate(['or', '1'], audiencesById, userAttributes);
275274
sinon.assert.calledOnce(customAttributeConditionEvaluator.evaluate);
276-
console.log('args: ', customAttributeConditionEvaluator.evaluate.firstCall.args);
277275
sinon.assert.calledWithExactly(
278276
customAttributeConditionEvaluator.evaluate,
279277
iphoneUserAudience.conditions[1],

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

+3-6
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ describe('lib/core/custom_attribute_condition_evaluator', function() {
854854
}
855855
});
856856

857-
it('should return false if the user-provided version is not greater than the condition version', function() {
857+
it('should return false if the user-provided version is not greater than the condition version', function() {
858858
var versions = [
859859
['2.0.1', '2.0.1'],
860860
['2.0', '2.0.0'],
@@ -896,7 +896,6 @@ describe('lib/core/custom_attribute_condition_evaluator', function() {
896896
assert.isNull(result);
897897

898898
assert.strictEqual(2, stubLogHandler.log.callCount);
899-
console.log(stubLogHandler.log.args);
900899
assert.strictEqual(
901900
stubLogHandler.log.args[0][1],
902901
'CUSTOM_ATTRIBUTE_CONDITION_EVALUATOR: Audience condition {"match":"semver_gt","name":"app_version","type":"custom_attribute","value":"2.0.0"} evaluated to UNKNOWN because a value of type "number" was passed for user attribute "app_version".'
@@ -996,7 +995,6 @@ describe('lib/core/custom_attribute_condition_evaluator', function() {
996995
assert.isNull(result);
997996

998997
assert.strictEqual(2, stubLogHandler.log.callCount);
999-
console.log(stubLogHandler.log.args);
1000998
assert.strictEqual(
1001999
stubLogHandler.log.args[0][1],
10021000
'CUSTOM_ATTRIBUTE_CONDITION_EVALUATOR: Audience condition {"match":"semver_lt","name":"app_version","type":"custom_attribute","value":"2.0.0"} evaluated to UNKNOWN because a value of type "number" was passed for user attribute "app_version".'
@@ -1095,7 +1093,6 @@ describe('lib/core/custom_attribute_condition_evaluator', function() {
10951093
assert.isNull(result);
10961094

10971095
assert.strictEqual(2, stubLogHandler.log.callCount);
1098-
console.log(stubLogHandler.log.args);
10991096
assert.strictEqual(
11001097
stubLogHandler.log.args[0][1],
11011098
'CUSTOM_ATTRIBUTE_CONDITION_EVALUATOR: Audience condition {"match":"semver_eq","name":"app_version","type":"custom_attribute","value":"2.0"} evaluated to UNKNOWN because a value of type "number" was passed for user attribute "app_version".'
@@ -1199,7 +1196,7 @@ describe('lib/core/custom_attribute_condition_evaluator', function() {
11991196
['2.0.0', '2.0.1'],
12001197
['2.0.1', '2.0.1'],
12011198
['1.9', '1.9.1']
1202-
];
1199+
];
12031200
for (let [targetVersion, userVersion] of versions) {
12041201
var customSemvereqCondition = {
12051202
match: 'semver_ge',
@@ -1221,7 +1218,7 @@ describe('lib/core/custom_attribute_condition_evaluator', function() {
12211218
var versions = [
12221219
['2.0.1', '2.0.0'],
12231220
['1.9.1', '1.9']
1224-
];
1221+
];
12251222
for (let [targetVersion, userVersion] of versions) {
12261223
var customSemvereqCondition = {
12271224
match: 'semver_ge',

0 commit comments

Comments
 (0)