Skip to content

Commit

Permalink
Fix tests and prepare rc
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Nov 30, 2023
1 parent 36e51a5 commit 550261f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build

- name: Store assets
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/sdks-7437' || github.ref == 'refs/heads/master') }}
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/sdks-7658' || github.ref == 'refs/heads/master') }}
uses: actions/upload-artifact@v3
with:
name: assets
Expand All @@ -69,7 +69,7 @@ jobs:
name: Upload assets
runs-on: ubuntu-20.04
needs: build
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/sdks-7437' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/sdks-7658' }}
strategy:
matrix:
environment:
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@splitsoftware/splitio",
"version": "10.24.0-beta",
"version": "10.24.0-rc.0",
"description": "Split SDK",
"files": [
"README.md",
Expand Down Expand Up @@ -40,7 +40,7 @@
"node": ">=6"
},
"dependencies": {
"@splitsoftware/splitio-commons": "1.12.1-rc.2",
"@splitsoftware/splitio-commons": "1.12.1-rc.3",
"@types/google.analytics": "0.0.40",
"@types/ioredis": "^4.28.0",
"bloom-filters": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/consumer/node_redis.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,18 @@ tape('NodeJS Redis', function (t) {
assert.equal(await client.getTreatment('UT_Segment_member', 'hierarchical_splits_testing_off'), 'off', 'Evaluations using Redis storage should be correct.');
assert.equal(await client.getTreatment('UT_Segment_member', 'hierarchical_splits_testing_on_negated'), 'off', 'Evaluations using Redis storage should be correct.');

assert.equal(typeof client.track('nicolas@split.io', 'user', 'test.redis.event', 18).then, 'function', 'Track calls should always return a promise on Redis mode.');
assert.equal(typeof client.track().then, 'function', 'Track calls should always return a promise on Redis mode, even when parameters are incorrect.');

assert.true(await client.track('nicolas@split.io', 'user', 'test.redis.event', 18), 'If the event was successfully queued the promise will resolve to true');
assert.false(await client.track(), 'If the event was NOT successfully queued the promise will resolve to false');

// Manager methods
const splitNames = await manager.names();
assert.equal(splitNames.length, 28, 'manager `names` method returns the list of split names asynchronously');
assert.equal(splitNames.length, 25, 'manager `names` method returns the list of split names asynchronously');
assert.equal(splitNames.indexOf(expectedSplitName) > -1, true, 'list of split names should contain expected splits');
assert.deepEqual(await manager.split(expectedSplitName), expectedSplitView, 'manager `split` method returns the split view of the given split name asynchronously');
const splitViews = await manager.splits();
assert.equal(splitViews.length, 28, 'manager `splits` method returns the list of split views asynchronously');
assert.equal(splitViews.length, 25, 'manager `splits` method returns the list of split views asynchronously');
assert.deepEqual(splitViews.find(splitView => splitView.name === expectedSplitName), expectedSplitView, 'manager `split` method returns the split view of the given split name asynchronously');

await client.ready(); // promise already resolved
Expand Down Expand Up @@ -283,6 +282,7 @@ tape('NodeJS Redis', function (t) {
// this should be deduped
assert.equal(await client.getTreatment('UT_Segment_member', 'hierarchical_splits_testing_on_negated'), 'off', 'Evaluations using Redis storage should be correct.');

assert.equal(typeof client.track('nicolas@split.io', 'user', 'test.redis.event', 18).then, 'function', 'Track calls should always return a promise on Redis mode.');
assert.equal(typeof client.track().then, 'function', 'Track calls should always return a promise on Redis mode, even when parameters are incorrect.');

assert.true(await client.track('nicolas@split.io', 'user', 'test.redis.event', 18), 'If the event was successfully queued the promise will resolve to true');
Expand Down
2 changes: 1 addition & 1 deletion src/settings/defaults/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const packageVersion = '10.24.0-beta';
export const packageVersion = '10.24.0-rc.0';

0 comments on commit 550261f

Please sign in to comment.