Skip to content

Commit 63d36e0

Browse files
Fix some typos
1 parent d914434 commit 63d36e0

6 files changed

Lines changed: 18 additions & 18 deletions

File tree

src/__tests__/browserSuites/events.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function withoutBindingTT(fetchMock, assert) {
6969
assert.ok(client.track, 'client.track should be defined.');
7070
assert.equal(typeof client.track, 'function', 'client.track should be a function.');
7171

72-
// Key binded as with getTreatment.
72+
// Key bound as with getTreatment.
7373
tsStart = Date.now();
7474
assert.ok(client.track('sometraffictype', 'someEvent', 10), 'client.track returns true if an event is added to the queue.');
7575
assert.ok(client.track('othertraffictype', 'genericEvent', 25), 'client.track returns true if event value is null and is added to the queue.');
@@ -96,7 +96,7 @@ export function withoutBindingTT(fetchMock, assert) {
9696
// Not for JS Browser SDK, because it doesn't let bind traffic types to clients
9797
export function bindingTT(fetchMock, assert) {
9898
const localSettings = Object.assign({}, baseSettings);
99-
localSettings.core.trafficType = 'binded_tt';
99+
localSettings.core.trafficType = 'bound_tt';
100100
const splitio = SplitFactory(localSettings);
101101
const client = splitio.client();
102102

@@ -113,20 +113,20 @@ export function bindingTT(fetchMock, assert) {
113113

114114
assert.equal(firstEvent.key, 'facundo@split.io', 'Key should match received value.');
115115
assert.equal(firstEvent.eventTypeId, 'someEvent', 'EventTypeId should match received value.');
116-
assert.equal(firstEvent.trafficTypeName, 'binded_tt', 'TrafficTypeName should match the binded value.');
116+
assert.equal(firstEvent.trafficTypeName, 'bound_tt', 'TrafficTypeName should match the bound value.');
117117
assert.equal(firstEvent.value, 10, 'Value should match the value received on the .track() function.');
118118
assert.equal(typeof firstEvent.timestamp, 'number', 'The timestamp should be a number.');
119119

120120
assert.equal(midEvent.key, 'facundo@split.io', 'Key should match received value.');
121121
assert.equal(midEvent.eventTypeId, 'genericEvent', 'EventTypeId should match received value.');
122-
assert.equal(midEvent.trafficTypeName, 'binded_tt', 'TrafficTypeName should match received value in lowercases.');
122+
assert.equal(midEvent.trafficTypeName, 'bound_tt', 'TrafficTypeName should match received value in lowercases.');
123123
assert.equal(midEvent.value, 24, 'Value should match the value received on the .track() function.');
124124
assert.true(midEvent.timestamp >= tsStart && midEvent.timestamp <= tsEnd, 'The timestamp should be a number with the right value.');
125125
assert.deepEqual(midEvent.properties, { prop1: true, prop2: 'a', prop3: 2, prop4: null, willBeNulled: null }, 'The properties should be correct.');
126126

127127
assert.equal(lastEvent.key, 'facundo@split.io', 'Key should match received value.');
128128
assert.equal(lastEvent.eventTypeId, 'my.checkout.event', 'EventTypeId should match received value.');
129-
assert.equal(lastEvent.trafficTypeName, 'binded_tt', 'TrafficTypeName should match the binded value.');
129+
assert.equal(lastEvent.trafficTypeName, 'bound_tt', 'TrafficTypeName should match the bound value.');
130130
assert.equal(lastEvent.value, null, 'Should have null as value.');
131131
assert.equal(typeof lastEvent.timestamp, 'number', 'The timestamp should be a number.');
132132

@@ -139,7 +139,7 @@ export function bindingTT(fetchMock, assert) {
139139
assert.ok(client.track, 'client.track should be defined.');
140140
assert.equal(typeof client.track, 'function', 'client.track should be a function.');
141141

142-
// Key binded as with getTreatment.
142+
// Key bound as with getTreatment.
143143
tsStart = Date.now();
144144
assert.ok(client.track('someEvent', 10), 'client.track returns true if an event is added to the queue.');
145145
assert.ok(client.track('genericEvent', 25), 'client.track returns true if an event is added to the queue');

src/__tests__/browserSuites/push-initialization-retries.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function testPushRetriesDueToAuthErrors(fetchMock, assert) {
6161
if (!opts.headers['Authorization']) assert.fail('`/v2/auth` request must include `Authorization` header');
6262
const lapse = Date.now() - start;
6363
const expected = (settings.scheduler.pushRetryBackoffBase * Math.pow(2, 0) + settings.scheduler.pushRetryBackoffBase * Math.pow(2, 1));
64-
assert.true(nearlyEqual(lapse, expected), 'third auth attempt (aproximately in 0.3 seconds from first attempt)');
64+
assert.true(nearlyEqual(lapse, expected), 'third auth attempt (approximately in 0.3 seconds from first attempt)');
6565
return { status: 200, body: authPushDisabled };
6666
});
6767
fetchMock.get({ url: url(settings, '/mySegments/nicolas%40split.io'), repeat: 4 }, { status: 200, body: mySegmentsNicolasMock });
@@ -124,7 +124,7 @@ export function testPushRetriesDueToSseErrors(fetchMock, assert) {
124124
} else {
125125
const lapse = Date.now() - start;
126126

127-
assert.true(nearlyEqual(lapse, expectedTimeToSSEsuccess), 'third auth attempt (aproximately in 0.3 seconds from first attempt)');
127+
assert.true(nearlyEqual(lapse, expectedTimeToSSEsuccess), 'third auth attempt (approximately in 0.3 seconds from first attempt)');
128128
eventSourceInstance.emitOpen();
129129
}
130130
sseattempts++;

src/__tests__/browserSuites/shared-instantiation.spec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ export default function sharedInstantiationSuite(startWithTT, sdkIgnoresTT, fetc
107107
const events = JSON.parse(opts.body);
108108

109109
assert.equal(events.length, sdkIgnoresTT ? 2 : 3, 'Tracked only valid events');
110-
assert.equal(events[0].trafficTypeName, `${startWithTT && !sdkIgnoresTT ? 'start' : 'main'}_tt`, 'matching traffic types both binded and provided through client.track()');
111-
assert.equal(events[1].trafficTypeName, 'marcio_tt', 'matching traffic types both binded and provided through client.track()');
112-
if (!sdkIgnoresTT) assert.equal(events[2].trafficTypeName, 'nico_tt', 'matching traffic types both binded and provided through client.track()');
110+
assert.equal(events[0].trafficTypeName, `${startWithTT && !sdkIgnoresTT ? 'start' : 'main'}_tt`, 'matching traffic type provided through client.track()');
111+
assert.equal(events[1].trafficTypeName, 'marcio_tt', 'matching traffic type provided through client.track()');
112+
if (!sdkIgnoresTT) assert.equal(events[2].trafficTypeName, 'nico_tt', 'matching traffic type provided through client.track()');
113113

114114
finished.next();
115115

@@ -124,14 +124,14 @@ export default function sharedInstantiationSuite(startWithTT, sdkIgnoresTT, fetc
124124
}
125125

126126
// Shared instance without TT on instantiation
127-
assert.false(marcioClient.track('marcioEvent'), 'If a shared client was created passing only key, no traffic type is binded so we need to provide one for client.track()');
128-
assert.true(marcioClient.track('marcio_tt', 'marcioEvent', 10), 'If a shared client was created passing only key, no traffic type is binded so we need to provide one for client.track()');
127+
assert.false(marcioClient.track('marcioEvent'), 'If a shared client was created passing only key, no traffic type is bound so we need to provide one for client.track()');
128+
assert.true(marcioClient.track('marcio_tt', 'marcioEvent', 10), 'If a shared client was created passing only key, no traffic type is bound so we need to provide one for client.track()');
129129

130130
// Shared instance with TT on instantiation
131131
if (sdkIgnoresTT) {
132-
assert.false(nicolasClient.track('nicoEvent', 10), 'If a shared client was created passing both key and TT but the SDK ignores TT, the latter doesn\'t get binded to it so it is necessary to provide the traffic type to client.track()');
132+
assert.false(nicolasClient.track('nicoEvent', 10), 'If a shared client was created passing both key and TT but the SDK ignores TT, the latter doesn\'t get bound to it so it is necessary to provide the traffic type to client.track()');
133133
} else {
134-
assert.true(nicolasClient.track('nicoEvent', 10), 'If a shared client was created passing both key and TT, the latter gets binded to it so it is not necessary to provide the traffic type to client.track()');
134+
assert.true(nicolasClient.track('nicoEvent', 10), 'If a shared client was created passing both key and TT, the latter gets bound to it so it is not necessary to provide the traffic type to client.track()');
135135
}
136136
};
137137

src/__tests__/browserSuites/use-beacon-api.debug.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const assertImpressionSent = (assert, impression) => {
3737
const assertEventSent = (assert, event) => {
3838
assert.equal(event.key, 'facundo@split.io', 'Key should match received value.');
3939
assert.equal(event.eventTypeId, 'someEvent', 'EventTypeId should match received value.');
40-
assert.equal(event.trafficTypeName, 'sometraffictype', 'TrafficTypeName should match the binded value.');
40+
assert.equal(event.trafficTypeName, 'sometraffictype', 'TrafficTypeName should match the bound value.');
4141
};
4242

4343
const assertCallsToBeaconAPI = (assert) => {

src/__tests__/browserSuites/use-beacon-api.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const assertImpressionSent = (assert, impression) => {
3434
const assertEventSent = (assert, event) => {
3535
assert.equal(event.key, 'facundo@split.io', 'Key should match received value.');
3636
assert.equal(event.eventTypeId, 'someEvent', 'EventTypeId should match received value.');
37-
assert.equal(event.trafficTypeName, 'sometraffictype', 'TrafficTypeName should match the binded value.');
37+
assert.equal(event.trafficTypeName, 'sometraffictype', 'TrafficTypeName should match the bound value.');
3838
};
3939

4040
const assertImpressionsCountSent = (assert, impressionCount) => {

src/__tests__/online/browser.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ tape('## E2E CI Tests ##', function (assert) {
108108
/* Check events */
109109
assert.test('E2E / Events', withoutBindingTT.bind(null, fetchMock));
110110
// Next test only applies for the isomorphic JS SDK, that support clients with bound TT
111-
// assert.test('E2E / Events with TT binded', bindingTT.bind(null, fetchMock));
111+
// assert.test('E2E / Events with TT bound', bindingTT.bind(null, fetchMock));
112112
/* Check shared clients */
113113
assert.test('E2E / Shared instances', sharedInstantiationSuite.bind(null, false, true, fetchMock));
114114
// Next test only applies for the isomorphic JS SDK, that support clients with bound TT

0 commit comments

Comments
 (0)