Skip to content

Commit 7678e00

Browse files
Update some links and fix redis and ready-from-cache tests
1 parent 61ff938 commit 7678e00

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ For a comprehensive list of open source projects visit our [Github page](https:/
8484

8585
**Learn more about Split:**
8686

87-
Visit [split.io/product](https://www.split.io/product) for an overview of Split, or visit our documentation at [help.split.io](http://help.split.io) for more detailed information.
87+
Visit [split.io/product](https://www.split.io/product) for an overview of Split, or visit our documentation at [help.split.io](https://help.split.io) for more detailed information.

src/__tests__/browserSuites/ready-from-cache.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ export default function (fetchMock, assert) {
564564
});
565565

566566
client.once(client.Event.SDK_READY, () => {
567-
t.deepEqual(manager.names(), ['p1__split', 'p2__split'], 'p1__split should be added for evaluation');
567+
t.deepEqual(manager.names().sort(), ['p1__split', 'p2__split'], 'p1__split should be added for evaluation');
568568

569569
client.destroy().then(() => {
570570
t.equal(localStorage.getItem('readyFromCache_5B.SPLITIO.splits.till'), '1457552620999', 'splits.till must correspond to the till of the last successfully fetched Splits');
@@ -610,11 +610,11 @@ export default function (fetchMock, assert) {
610610
const manager = splitio.manager();
611611

612612
client.once(client.Event.SDK_READY_FROM_CACHE, () => {
613-
t.deepEqual(manager.names(), ['p2__split', 'p1__split'], 'splits shouldn\'t be removed for evaluation');
613+
t.deepEqual(manager.names().sort(), ['p1__split', 'p2__split'], 'splits shouldn\'t be removed for evaluation');
614614
});
615615

616616
client.once(client.Event.SDK_READY, () => {
617-
t.deepEqual(manager.names(), ['p2__split', 'p1__split'], 'active splits should be present for evaluation');
617+
t.deepEqual(manager.names().sort(), ['p1__split', 'p2__split'], 'active splits should be present for evaluation');
618618

619619
client.destroy().then(() => {
620620
t.equal(localStorage.getItem('some_user_item'), 'user_item', 'user items at localStorage must not be changed');
@@ -667,7 +667,7 @@ export default function (fetchMock, assert) {
667667
});
668668

669669
client.once(client.Event.SDK_READY, () => {
670-
t.deepEqual(manager.names(), ['p2__split', 'p1__split'], 'active splits should be present for evaluation');
670+
t.deepEqual(manager.names().sort(), ['p1__split', 'p2__split'], 'active splits should be present for evaluation');
671671

672672
client.destroy().then(() => {
673673
t.equal(localStorage.getItem('some_user_item'), 'user_item', 'user items at localStorage must not be changed');
@@ -780,7 +780,7 @@ export default function (fetchMock, assert) {
780780
const manager = splitio.manager();
781781

782782
client.once(client.Event.SDK_READY, () => {
783-
t.deepEqual(manager.names(), ['p3__split', 'p2__split'], 'active splits should be present for evaluation');
783+
t.deepEqual(manager.names().sort(), ['p2__split', 'p3__split'], 'active splits should be present for evaluation');
784784

785785
client.destroy().then(() => {
786786
t.equal(localStorage.getItem('some_user_item'), 'user_item', 'user items at localStorage must not be changed');

src/__tests__/consumer/node_redis.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ tape('Node.js Redis', function (t) {
181181
assert.deepEqual(trackedImpressionsAndEvents, [TOTAL_RAW_IMPRESSIONS, TOTAL_EVENTS], 'Tracked impressions and events should be stored in Redis');
182182

183183
// Validate stored telemetry
184-
exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}" | redis-cli -p ${redisPort}`, (error, stdout) => {
184+
exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init 'nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}'" | redis-cli -p ${redisPort}`, (error, stdout) => {
185185
if (error) assert.fail('Redis server should be reachable');
186186

187187
const [latencies, exceptions, configValue] = stdout.split('\n').filter(line => line !== '').map(JSON.parse);
@@ -304,7 +304,7 @@ tape('Node.js Redis', function (t) {
304304
assert.deepEqual(trackedImpressionsAndEvents, [TOTAL_RAW_IMPRESSIONS - DEDUPED_IMPRESSIONS, TOTAL_EVENTS], 'Tracked impressions and events should be stored in Redis');
305305

306306
// Validate stored telemetry
307-
exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}" | redis-cli -p ${redisPort}`, (error, stdout) => {
307+
exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init 'nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}'" | redis-cli -p ${redisPort}`, (error, stdout) => {
308308
if (error) assert.fail('Redis server should be reachable');
309309

310310
const [latencies, exceptions, configValue] = stdout.split('\n').filter(line => line !== '').map(JSON.parse);
@@ -406,7 +406,7 @@ tape('Node.js Redis', function (t) {
406406
assert.deepEqual(trackedImpressionsAndEvents, [0, TOTAL_EVENTS], 'No impressions are stored in Redis in NONE impressions mode');
407407

408408
// Validate stored telemetry
409-
exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}" | redis-cli -p ${redisPort}`, (error, stdout) => {
409+
exec(`echo "HLEN ${config.storage.prefix}.SPLITIO.telemetry.latencies \n HLEN ${config.storage.prefix}.SPLITIO.telemetry.exceptions \n HGET ${config.storage.prefix}.SPLITIO.telemetry.init 'nodejs-${version}/${HOSTNAME_VALUE}/${IP_VALUE}'" | redis-cli -p ${redisPort}`, (error, stdout) => {
410410
if (error) assert.fail('Redis server should be reachable');
411411

412412
const [latencies, exceptions, configValue] = stdout.split('\n').filter(line => line !== '').map(JSON.parse);

src/__tests__/testUtils/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export function nearlyEqual(actual, expected, epsilon = DEFAULT_ERROR_MARGIN) {
1818
* - when `?since=-1`, it returns the given segment `keys` in `added` list.
1919
* - otherwise, it returns empty `added` and `removed` lists, and the same since and till values.
2020
*
21-
* @param {Object} fetchMock see http://www.wheresrhys.co.uk/fetch-mock
22-
* @param {string|RegExp|...} matcher see http://www.wheresrhys.co.uk/fetch-mock/#api-mockingmock_matcher
21+
* @param {Object} fetchMock see https://www.wheresrhys.co.uk/fetch-mock
22+
* @param {string|RegExp|...} matcher see https://www.wheresrhys.co.uk/fetch-mock/#api-mockingmock_matcher
2323
* @param {string[]} keys array of segment keys to fetch
2424
* @param {number} changeNumber optional changeNumber
2525
*/

types/client/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Declaration file for JavaScript Split Software SDK
2-
// Project: http://www.split.io/
2+
// Project: https://www.split.io/
33

44
import '@splitsoftware/splitio-commons';
55

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Declaration file for JavaScript and Node.js Split Software SDK v8.1.0
2-
// Project: http://www.split.io/
2+
// Project: https://www.split.io/
33
// Definitions by: Nico Zelaya <https://github.com/NicoZelaya/>
44

55
/// <reference path="./splitio.d.ts" />

types/server/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Declaration file for JavaScript Split Software SDK
2-
// Project: http://www.split.io/
2+
// Project: https://www.split.io/
33

44
import '@splitsoftware/splitio-commons';
55

0 commit comments

Comments
 (0)