Skip to content

Commit 17b4d18

Browse files
Merge pull request #231 from splitio/misc
Misc: update README, GH action version, and typo fix
2 parents 05d9f67 + 99574bb commit 17b4d18

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

.github/workflows/ci-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
fetch-depth: 0
2929

3030
- name: Set up Node.js
31-
uses: actions/setup-node@v3
31+
uses: actions/setup-node@v4
3232
with:
3333
node-version: 'lts/*'
3434
cache: 'npm'

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Split has built and maintains SDKs for:
7777
* .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
7878
* Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK)
7979
* Angular [Github](https://github.com/splitio/angular-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/6495326064397-Angular-utilities)
80+
* Elixir thin-client [Github](https://github.com/splitio/elixir-thin-client) [Docs](https://help.split.io/hc/en-us/articles/26988707417869-Elixir-Thin-Client-SDK)
8081
* Flutter [Github](https://github.com/splitio/flutter-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/8096158017165-Flutter-plugin)
8182
* GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
8283
* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
@@ -96,4 +97,4 @@ For a comprehensive list of open source projects visit our [Github page](https:/
9697

9798
**Learn more about Split:**
9899

99-
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.
100+
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__/SplitTreatments.test.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ describe.each([
228228
}) {
229229
return (
230230
<SplitFactoryProvider factory={outerFactory} >
231-
<SplitClient splitKey={splitKey} updateOnSdkUpdate={true} attributes={clientAttributes} >
231+
<SplitClient splitKey={splitKey} attributes={clientAttributes} >
232232
<InnerComponent names={names} attributes={attributes} flagSets={flagSets} />
233233
</SplitClient>
234234
</SplitFactoryProvider>
@@ -269,7 +269,7 @@ describe.each([
269269
});
270270

271271
it('rerenders and re-evaluates feature flags if names are not equals (shallow array comparison).', () => {
272-
wrapper.rerender(<Component names={[...names, 'split3']} attributes={{ ...attributes }} splitKey={splitKey} />);
272+
wrapper.rerender(<Component names={[...names, 'split3']} flagSets={flagSets} attributes={attributes} splitKey={splitKey} />);
273273

274274
expect(renderTimes).toBe(2);
275275
expect(outerFactory.client().getTreatmentsWithConfig).toBeCalledTimes(2);
@@ -290,14 +290,14 @@ describe.each([
290290

291291
it('rerenders and re-evaluates feature flags if attributes are not equals (shallow object comparison).', () => {
292292
const attributesRef = { ...attributes, att2: 'att2' };
293-
wrapper.rerender(<Component names={[...names]} attributes={attributesRef} splitKey={splitKey} />);
293+
wrapper.rerender(<Component names={names} flagSets={flagSets} attributes={attributesRef} splitKey={splitKey} />);
294294

295295
expect(renderTimes).toBe(2);
296296
expect(outerFactory.client().getTreatmentsWithConfig).toBeCalledTimes(2);
297297

298298
// If passing same reference but mutated (bad practice), the component re-renders but doesn't re-evaluate feature flags
299299
attributesRef.att2 = 'att2_val2';
300-
wrapper.rerender(<Component names={[...names]} attributes={attributesRef} splitKey={splitKey} />);
300+
wrapper.rerender(<Component names={names} flagSets={flagSets} attributes={attributesRef} splitKey={splitKey} />);
301301
expect(renderTimes).toBe(3);
302302
expect(outerFactory.client().getTreatmentsWithConfig).toBeCalledTimes(2);
303303
});
@@ -307,10 +307,11 @@ describe.each([
307307

308308
// State update and split evaluation
309309
act(() => (outerFactory as any).client().__emitter__.emit(Event.SDK_UPDATE));
310+
expect(outerFactory.client().getTreatmentsWithConfig).toBeCalledTimes(2);
310311

311312
// State update after destroy doesn't re-evaluate because the sdk is not operational
312313
(outerFactory as any).client().destroy();
313-
wrapper.rerender(<Component names={names} attributes={attributes} splitKey={splitKey} />);
314+
wrapper.rerender(<Component names={names} flagSets={flagSets} attributes={attributes} splitKey={splitKey} />);
314315

315316
// Updates were batched as a single render, due to automatic batching https://reactjs.org/blog/2022/03/29/react-v18.html#new-feature-automatic-batching
316317
expect(renderTimes).toBe(3);

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface ISplitStatus {
1818

1919
/**
2020
* `isTimedout` indicates if the Split SDK client has triggered an `SDK_READY_TIMED_OUT` event and is not ready to be consumed.
21-
* In other words, `isTimedout` is equivalent to `hasTimeout && !isReady`.
21+
* In other words, `isTimedout` is equivalent to `hasTimedout && !isReady`.
2222
*/
2323
isTimedout: boolean;
2424

0 commit comments

Comments
 (0)