You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/__tests__/consumer/browser_consumer.spec.js
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -132,8 +132,8 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
132
132
assert.equal(typeofclient.track('user','test.event',18).then,'function','Track calls should always return a promise on Consumer mode.');
133
133
assert.equal(typeofclient.track().then,'function','Track calls should always return a promise on Consumer mode, even when parameters are incorrect.');
134
134
135
-
assert.true(awaitclient.track('user','test.event',18),'If the event was succesfully queued the promise will resolve to true');
136
-
assert.false(awaitclient.track(),'If the event was NOT succesfully queued the promise will resolve to false');
135
+
assert.true(awaitclient.track('user','test.event',18),'If the event was successfully queued the promise will resolve to true');
136
+
assert.false(awaitclient.track(),'If the event was NOT successfully queued the promise will resolve to false');
137
137
138
138
// Evaluations with flag sets
139
139
assert.deepEqual(awaitclient.getTreatmentsByFlagSet('set_a'),{with_set_a: 'on',with_sets_a_b: 'on'},'Evaluations with getTreatmentsByFlagSet should be correct.');
@@ -186,7 +186,7 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
186
186
187
187
// Assert impressionsListener
188
188
setTimeout(()=>{
189
-
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS+TOTAL_RAW_IMPRESSIONS_IN_EVALUATIONS_WITH_FLAGSETS,'Each evaluation has its corresponting impression');
189
+
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS+TOTAL_RAW_IMPRESSIONS_IN_EVALUATIONS_WITH_FLAGSETS,'Each evaluation has its corresponding impression');
190
190
assert.equal(impressions[0].impression.label,SDK_NOT_READY,'The first impression is control with label "sdk not ready"');
191
191
192
192
assert.end();
@@ -282,8 +282,8 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
282
282
assert.equal(typeofclient.track('user','test.event',18).then,'function','Track calls should always return a promise on Consumer mode.');
283
283
assert.equal(typeofclient.track().then,'function','Track calls should always return a promise on Consumer mode, even when parameters are incorrect.');
284
284
285
-
assert.true(awaitclient.track('user','test.event',18),'If the event was succesfully queued the promise will resolve to true');
286
-
assert.false(awaitclient.track(),'If the event was NOT succesfully queued the promise will resolve to false');
285
+
assert.true(awaitclient.track('user','test.event',18),'If the event was successfully queued the promise will resolve to true');
286
+
assert.false(awaitclient.track(),'If the event was NOT successfully queued the promise will resolve to false');
287
287
288
288
// New shared client created
289
289
constnewClient=sdk.client('other');
@@ -318,7 +318,7 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
318
318
319
319
// Assert impressionsListener
320
320
setTimeout(()=>{
321
-
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS,'Each evaluation has its corresponting impression');
321
+
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS,'Each evaluation has its corresponding impression');
322
322
assert.equal(impressions[0].impression.label,SDK_NOT_READY,'The first impression is control with label "sdk not ready"');
323
323
324
324
assert.end();
@@ -414,8 +414,8 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
414
414
assert.equal(typeofclient.track('user','test.event',18).then,'function','Track calls should always return a promise on Consumer mode.');
415
415
assert.equal(typeofclient.track().then,'function','Track calls should always return a promise on Consumer mode, even when parameters are incorrect.');
416
416
417
-
assert.true(awaitclient.track('user','test.event',18),'If the event was succesfully queued the promise will resolve to true');
418
-
assert.false(awaitclient.track(),'If the event was NOT succesfully queued the promise will resolve to false');
417
+
assert.true(awaitclient.track('user','test.event',18),'If the event was successfully queued the promise will resolve to true');
418
+
assert.false(awaitclient.track(),'If the event was NOT successfully queued the promise will resolve to false');
419
419
420
420
// New shared client created
421
421
constnewClient=sdk.client('other');
@@ -472,7 +472,7 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
472
472
473
473
// Assert impressionsListener
474
474
setTimeout(()=>{
475
-
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS,'Each evaluation has its corresponting impression');
475
+
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS,'Each evaluation has its corresponding impression');
476
476
assert.equal(impressions[0].impression.label,SDK_NOT_READY,'The first impression is control with label "sdk not ready"');
477
477
478
478
assert.end();
@@ -522,8 +522,8 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
522
522
// some asserts to test regular usage
523
523
assert.equal(awaitclient.getTreatment('UT_IN_SEGMENT'),'on','Evaluations using pluggable storage should be correct.');
524
524
assert.equal(awaitotherClient.getTreatment('UT_IN_SEGMENT'),'off','Evaluations using pluggable storage should be correct.');
525
-
assert.true(awaitclient.track('user','test.event',18),'If the event was succesfully queued the promise will resolve to true');
526
-
assert.false(awaitclient.track(),'If the event was NOT succesfully queued the promise will resolve to false');
525
+
assert.true(awaitclient.track('user','test.event',18),'If the event was successfully queued the promise will resolve to true');
526
+
assert.false(awaitclient.track(),'If the event was NOT successfully queued the promise will resolve to false');
527
527
528
528
awaitclient.destroy();
529
529
assert.end();
@@ -563,7 +563,7 @@ tape('Browser Consumer mode with pluggable storage', function (t) {
563
563
564
564
// Assert impressionsListener
565
565
setTimeout(()=>{
566
-
assert.equal(impressions.length,2,'Each evaluation has its corresponting impression');
566
+
assert.equal(impressions.length,2,'Each evaluation has its corresponding impression');
567
567
assert.equal(impressions[1].impression.label,EXCEPTION,'The last impression is control with label "exception"');
Copy file name to clipboardExpand all lines: src/__tests__/consumer/browser_consumer_partial.spec.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -158,8 +158,8 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
158
158
assert.equal(typeofclient.track('user','test.event',18).then,'function','Track calls should always return a promise on Consumer mode.');
159
159
assert.equal(typeofclient.track().then,'function','Track calls should always return a promise on Consumer mode, even when parameters are incorrect.');
160
160
161
-
assert.true(awaitclient.track('user','test.event',18),'If the event was succesfully queued the promise will resolve to true');
162
-
assert.false(awaitclient.track(),'If the event was NOT succesfully queued the promise will resolve to false');
161
+
assert.true(awaitclient.track('user','test.event',18),'If the event was successfully queued the promise will resolve to true');
162
+
assert.false(awaitclient.track(),'If the event was NOT successfully queued the promise will resolve to false');
163
163
164
164
// Evaluations with flag sets
165
165
assert.deepEqual(awaitclient.getTreatmentsByFlagSet('set_a'),{with_set_a: 'on',with_sets_a_b: 'on'},'Evaluations with getTreatmentsByFlagSet should be correct.');
@@ -201,7 +201,7 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
201
201
202
202
// Assert impressionsListener
203
203
setTimeout(()=>{
204
-
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS+TOTAL_RAW_IMPRESSIONS_IN_EVALUATIONS_WITH_FLAGSETS,'Each evaluation has its corresponting impression');
204
+
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS+TOTAL_RAW_IMPRESSIONS_IN_EVALUATIONS_WITH_FLAGSETS,'Each evaluation has its corresponding impression');
205
205
assert.equal(impressions[0].impression.label,SDK_NOT_READY,'The first impression is control with label "sdk not ready"');
206
206
207
207
assert.end();
@@ -326,8 +326,8 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
326
326
assert.equal(typeofclient.track('user','test.event',18).then,'function','Track calls should always return a promise on Consumer mode.');
327
327
assert.equal(typeofclient.track().then,'function','Track calls should always return a promise on Consumer mode, even when parameters are incorrect.');
328
328
329
-
assert.true(awaitclient.track('user','test.event',18),'If the event was succesfully queued the promise will resolve to true');
330
-
assert.false(awaitclient.track(),'If the event was NOT succesfully queued the promise will resolve to false');
329
+
assert.true(awaitclient.track('user','test.event',18),'If the event was successfully queued the promise will resolve to true');
330
+
assert.false(awaitclient.track(),'If the event was NOT successfully queued the promise will resolve to false');
331
331
332
332
// New shared client created
333
333
constnewClient=sdk.client('other');
@@ -348,7 +348,7 @@ tape('Browser Consumer Partial mode with pluggable storage', function (t) {
348
348
349
349
// Assert impressionsListener
350
350
setTimeout(()=>{
351
-
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS,'Each evaluation has its corresponting impression');
351
+
assert.equal(impressions.length,TOTAL_RAW_IMPRESSIONS,'Each evaluation has its corresponding impression');
352
352
assert.equal(impressions[0].impression.label,SDK_NOT_READY,'The first impression is control with label "sdk not ready"');
0 commit comments