Skip to content

Commit c1bdce1

Browse files
Update ts-test
1 parent 18235b7 commit c1bdce1

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build
5858

5959
- name: Store assets
60-
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/fme-10568' || github.ref == 'refs/heads/main') }}
60+
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/main') }}
6161
uses: actions/upload-artifact@v4
6262
with:
6363
name: assets
@@ -68,7 +68,7 @@ jobs:
6868
name: Upload assets
6969
runs-on: ubuntu-latest
7070
needs: build
71-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/fme-10568' }}
71+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }}
7272
strategy:
7373
matrix:
7474
environment:

ts-tests/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,24 @@ let nodeEventEmitter: NodeJS.EventEmitter = client;
258258

259259
// Ready, destroy and flush
260260
let promise: Promise<void> = client.ready();
261+
promise = client.whenReady();
261262
promise = client.destroy();
262263
promise = SDK.destroy();
263264
// @TODO not public yet
264265
// promise = client.flush();
266+
const promiseWhenReadyFromCache: Promise<boolean> = client.whenReadyFromCache();
267+
268+
// Get readiness status
269+
let status: SplitIO.ReadinessStatus = client.getStatus();
270+
status = {
271+
isReady: false,
272+
isReadyFromCache: false,
273+
isTimedout: false,
274+
isDestroyed: false,
275+
isOperational: false,
276+
hasTimedout: false,
277+
lastUpdate: 0
278+
}
265279

266280
// We can call getTreatment with or without a key.
267281
treatment = client.getTreatment(splitKey, 'mySplit');

0 commit comments

Comments
 (0)