Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Apr 10, 2024
1 parent ff12f34 commit 0980301
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function testPushRetriesDueToAuthErrors(fetchMock, assert) {
if (!opts.headers['Authorization']) assert.fail('`/v2/auth` request must include `Authorization` header');
const lapse = Date.now() - start;
const expected = (settings.scheduler.pushRetryBackoffBase * Math.pow(2, 0) + settings.scheduler.pushRetryBackoffBase * Math.pow(2, 1));
assert.true(nearlyEqual(lapse, expected), 'third auth attempt (aproximately in 0.3 seconds from first attempt)');
assert.true(nearlyEqual(lapse, expected), 'third auth attempt (approximately in 0.3 seconds from first attempt)');
return { status: 200, body: authPushDisabled };
});
fetchMock.get({ url: url(settings, '/mySegments/nicolas%40split.io'), repeat: 4 }, { status: 200, body: mySegmentsNicolasMock });
Expand Down Expand Up @@ -124,7 +124,7 @@ export function testPushRetriesDueToSseErrors(fetchMock, assert) {
} else {
const lapse = Date.now() - start;

assert.true(nearlyEqual(lapse, expectedTimeToSSEsuccess), 'third auth attempt (aproximately in 0.3 seconds from first attempt)');
assert.true(nearlyEqual(lapse, expectedTimeToSSEsuccess), 'third auth attempt (approximately in 0.3 seconds from first attempt)');
eventSourceInstance.emitOpen();
}
sseattempts++;
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/nodeSuites/push-initialization-retries.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function testPushRetriesDueToAuthErrors(fetchMock, assert) {
if (!opts.headers['Authorization']) assert.fail('`/v2/auth` request must include `Authorization` header');
const lapse = Date.now() - start;
const expected = (settings.scheduler.pushRetryBackoffBase * Math.pow(2, 0) + settings.scheduler.pushRetryBackoffBase * Math.pow(2, 1));
assert.true(nearlyEqual(lapse, expected), 'third auth attempt (aproximately in 0.3 seconds from first attempt)');
assert.true(nearlyEqual(lapse, expected), 'third auth attempt (approximately in 0.3 seconds from first attempt)');
return { status: 200, body: authPushDisabled };
});
fetchMock.get(new RegExp(`${url(settings, '/segmentChanges/')}.*`), { status: 200, body: { since: 10, till: 10, name: 'segmentName', added: [], removed: [] } });
Expand Down Expand Up @@ -116,7 +116,7 @@ export function testPushRetriesDueToSseErrors(fetchMock, assert) {
} else {
const lapse = Date.now() - start;

assert.true(nearlyEqual(lapse, expectedTimeToSSEsuccess), 'third auth attempt (aproximately in 0.3 seconds from first attempt)');
assert.true(nearlyEqual(lapse, expectedTimeToSSEsuccess), 'third auth attempt (approximately in 0.3 seconds from first attempt)');
eventSourceInstance.emitOpen();
}
sseattempts++;
Expand Down

0 comments on commit 0980301

Please sign in to comment.