You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expect(getClient(splitSdk).evalOnReady.length).toEqual(0);// control assertion - no evaluations were registered for SDK_READY on main client
540
+
expect(getClient(splitSdk,'other-user-key').evalOnReady.length).toEqual(1);// control assertion - 1 evaluation was registered for SDK_READY on the new client
expect(getClient(splitSdk).evalOnReady.length).toEqual(0);// control assertion - no evaluations were registered for SDK_READY on main client
544
-
expect(getClient(splitSdk,'other-user-key').evalOnReady.length).toEqual(1);// control assertion - 1 evaluation was registered for SDK_READY on the new client
expect(store.getActions().length).toBe(7);// control assertion - no more actions after the update.
635
-
expect(splitSdk.factory.client('other-user-key').getTreatmentsWithConfig).toBeCalledTimes(4);// control assertion - called 4 times, in actions SPLIT_READY_FROM_CACHE_WITH_EVALUATIONS, SPLIT_READY_WITH_EVALUATIONS, SPLIT_UPDATE_WITH_EVALUATIONS and ADD_TREATMENTS.
640
+
expect(store.getActions().length).toBe(9);// control assertion - no more actions after the update.
641
+
expect(splitSdk.factory.client('other-user-key').getTreatmentsWithConfig).toBeCalledTimes(5);// control assertion - called 5 times, in actions ADD_TREATMENTS, SPLIT_READY_FROM_CACHE_WITH_EVALUATIONS, SPLIT_READY_WITH_EVALUATIONS, SPLIT_UPDATE_WITH_EVALUATIONS and ADD_TREATMENTS.
Copy file name to clipboardExpand all lines: src/asyncActions.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,7 @@ export function getTreatments(params: IGetTreatmentsParams): Action | (() => voi
148
148
client.evalOnReady.push(params);
149
149
}
150
150
151
-
// @TODOremove `evalOnReadyFromCache` config option, since `false` value has no effect on shared clients (they are ready from cache immediately) and on the main client if its ready from cache when `getTreatments` is called
151
+
// @TODObreaking: consider removing `evalOnReadyFromCache` config option, since `false` value has no effect on shared clients (they are ready from cache immediately) and on the main client if its ready from cache when `getTreatments` is called
152
152
// If the SDK is not ready from cache and flag `evalOnReadyFromCache`, it stores the action to execute when ready from cache
0 commit comments