Skip to content

Commit 6d8bd73

Browse files
fix typo
1 parent 70c4a97 commit 6d8bd73

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/__tests__/useTrack.test.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ describe('useTrack', () => {
2121
const value = 10;
2222
const properties = { prop1: 'prop1' };
2323

24-
test('returns the track method binded to the client at Split context updated by SplitFactory.', () => {
24+
test('returns the track method bound to the client at Split context updated by SplitFactory.', () => {
2525
const outerFactory = SplitSdk(sdkBrowser);
26-
let bindedTrack;
26+
let boundTrack;
2727
let trackResult;
2828

2929
render(
3030
<SplitFactory factory={outerFactory} >
3131
{React.createElement(() => {
32-
bindedTrack = useTrack();
33-
trackResult = bindedTrack(tt, eventType, value, properties);
32+
boundTrack = useTrack();
33+
trackResult = boundTrack(tt, eventType, value, properties);
3434
return null;
3535
})}
3636
</SplitFactory>,
@@ -40,17 +40,17 @@ describe('useTrack', () => {
4040
expect(track).toHaveReturnedWith(trackResult);
4141
});
4242

43-
test('returns the track method binded to the client at Split context updated by SplitClient.', () => {
43+
test('returns the track method bound to the client at Split context updated by SplitClient.', () => {
4444
const outerFactory = SplitSdk(sdkBrowser);
45-
let bindedTrack;
45+
let boundTrack;
4646
let trackResult;
4747

4848
render(
4949
<SplitFactory factory={outerFactory} >
5050
<SplitClient splitKey='user2' >
5151
{React.createElement(() => {
52-
bindedTrack = useTrack();
53-
trackResult = bindedTrack(tt, eventType, value, properties);
52+
boundTrack = useTrack();
53+
trackResult = boundTrack(tt, eventType, value, properties);
5454
return null;
5555
})}
5656
</SplitClient>
@@ -61,16 +61,16 @@ describe('useTrack', () => {
6161
expect(track).toHaveReturnedWith(trackResult);
6262
});
6363

64-
test('returns the track method binded to a new client given a splitKey and optional trafficType.', () => {
64+
test('returns the track method bound to a new client given a splitKey and optional trafficType.', () => {
6565
const outerFactory = SplitSdk(sdkBrowser);
66-
let bindedTrack;
66+
let boundTrack;
6767
let trackResult;
6868

6969
render(
7070
<SplitFactory factory={outerFactory} >
7171
{React.createElement(() => {
72-
bindedTrack = useTrack('user2', tt);
73-
trackResult = bindedTrack(eventType, value, properties);
72+
boundTrack = useTrack('user2', tt);
73+
trackResult = boundTrack(eventType, value, properties);
7474
return null;
7575
})}
7676
</SplitFactory>,

src/useTrack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const noOpFalse = () => false;
77
* 'useTrack' is a hook that returns the track method from a Split client.
88
* It uses the 'useContext' hook to access the client from the Split context.
99
*
10-
* @return A track function binded to a Split client. If the client is not available, the result is a no-op function that returns false.
10+
* @return A track function bound to a Split client. If the client is not available, the result is a no-op function that returns false.
1111
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#track}
1212
*/
1313
export function useTrack(key?: SplitIO.SplitKey, trafficType?: string): SplitIO.IBrowserClient['track'] {

types/useTrack.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 'useTrack' is a hook that returns the track method from a Split client.
33
* It uses the 'useContext' hook to access the client from the Split context.
44
*
5-
* @return A track function binded to a Split client. If the client is not available, the result is a no-op function that returns false.
5+
* @return A track function bound to a Split client. If the client is not available, the result is a no-op function that returns false.
66
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#track}
77
*/
88
export declare function useTrack(key?: SplitIO.SplitKey, trafficType?: string): SplitIO.IBrowserClient['track'];

0 commit comments

Comments
 (0)