Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Sep 20, 2024
1 parent 195b1b1 commit 24137dc
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/__tests__/browserSuites/readiness.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ export default function (fetchMock, assert) {
});
const CLIENTS_COUNT = 3; // Just so it's easier to read the assertions.
const client = splitio.client();
const client2 = splitio.client('[email protected]');
const client3 = splitio.client('[email protected]');
splitio.client('[email protected]');
splitio.client('[email protected]');

client.once(client.Event.SDK_READY, () => {
t.ok(Date.now() - start >= membershipsEndpointDelay, 'It should not be ready without waiting for memberships, as there are segments in the first splits payload.');
Expand Down Expand Up @@ -466,8 +466,8 @@ export default function (fetchMock, assert) {
});
const CLIENTS_COUNT = 3; // Just so it's easier to read the assertions.
const client = splitio.client();
const client2 = splitio.client('[email protected]');
const client3 = splitio.client('[email protected]');
splitio.client('[email protected]');
splitio.client('[email protected]');

client.once(client.Event.SDK_READY, () => {
t.ok(Date.now() - start >= membershipsEndpointDelay, 'It should not be ready without waiting for memberships, when we start from cache it might be stale.');
Expand Down Expand Up @@ -509,8 +509,8 @@ export default function (fetchMock, assert) {
});
const CLIENTS_COUNT = 3; // Just so it's easier to read the assertions.
const client = splitio.client();
const client2 = splitio.client('[email protected]');
const client3 = splitio.client('[email protected]');
splitio.client('[email protected]');
splitio.client('[email protected]');

client.once(client.Event.SDK_READY, () => {
t.ok(Date.now() - start < 50, 'It should be ready quickly, since it had no segments and update has no segments either.');
Expand Down Expand Up @@ -556,8 +556,8 @@ export default function (fetchMock, assert) {
});
const CLIENTS_COUNT = 3; // Just so it's easier to read the assertions.
const client = splitio.client();
const client2 = splitio.client('[email protected]');
const client3 = splitio.client('[email protected]');
splitio.client('[email protected]');
splitio.client('[email protected]');

client.once(client.Event.SDK_READY, () => {
const delay = Date.now() - start;
Expand Down Expand Up @@ -599,8 +599,8 @@ export default function (fetchMock, assert) {
});
const CLIENTS_COUNT = 3; // Just so it's easier to read the assertions.
const client = splitio.client();
const client2 = splitio.client('[email protected]');
const client3 = splitio.client('[email protected]');
splitio.client('[email protected]');
splitio.client('[email protected]');

client.once(client.Event.SDK_READY, () => {
t.ok(Date.now() - start >= membershipsEndpointDelay, 'It should not be ready without waiting for memberships, when we start from cache it might be stale and we had segments even though the update has nothing.');
Expand Down Expand Up @@ -645,8 +645,8 @@ export default function (fetchMock, assert) {
});
const CLIENTS_COUNT = 3; // Just so it's easier to read the assertions.
const client = splitio.client();
const client2 = splitio.client('[email protected]');
const client3 = splitio.client('[email protected]');
splitio.client('[email protected]');
splitio.client('[email protected]');

client.once(client.Event.SDK_READY, () => {
t.ok(Date.now() - start < 50, 'It should be ready without waiting for memberships, since when it downloads changes it will have no more use for them.');
Expand Down

0 comments on commit 24137dc

Please sign in to comment.