Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Oct 5, 2023
1 parent 70c4a97 commit 6d8bd73
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions src/__tests__/useTrack.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ describe('useTrack', () => {
const value = 10;
const properties = { prop1: 'prop1' };

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

render(
<SplitFactory factory={outerFactory} >
{React.createElement(() => {
bindedTrack = useTrack();
trackResult = bindedTrack(tt, eventType, value, properties);
boundTrack = useTrack();
trackResult = boundTrack(tt, eventType, value, properties);
return null;
})}
</SplitFactory>,
Expand All @@ -40,17 +40,17 @@ describe('useTrack', () => {
expect(track).toHaveReturnedWith(trackResult);
});

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

render(
<SplitFactory factory={outerFactory} >
<SplitClient splitKey='user2' >
{React.createElement(() => {
bindedTrack = useTrack();
trackResult = bindedTrack(tt, eventType, value, properties);
boundTrack = useTrack();
trackResult = boundTrack(tt, eventType, value, properties);
return null;
})}
</SplitClient>
Expand All @@ -61,16 +61,16 @@ describe('useTrack', () => {
expect(track).toHaveReturnedWith(trackResult);
});

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

render(
<SplitFactory factory={outerFactory} >
{React.createElement(() => {
bindedTrack = useTrack('user2', tt);
trackResult = bindedTrack(eventType, value, properties);
boundTrack = useTrack('user2', tt);
trackResult = boundTrack(eventType, value, properties);
return null;
})}
</SplitFactory>,
Expand Down
2 changes: 1 addition & 1 deletion src/useTrack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const noOpFalse = () => false;
* 'useTrack' is a hook that returns the track method from a Split client.
* It uses the 'useContext' hook to access the client from the Split context.
*
* @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.
* @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.
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#track}
*/
export function useTrack(key?: SplitIO.SplitKey, trafficType?: string): SplitIO.IBrowserClient['track'] {
Expand Down
2 changes: 1 addition & 1 deletion types/useTrack.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* 'useTrack' is a hook that returns the track method from a Split client.
* It uses the 'useContext' hook to access the client from the Split context.
*
* @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.
* @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.
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#track}
*/
export declare function useTrack(key?: SplitIO.SplitKey, trafficType?: string): SplitIO.IBrowserClient['track'];

0 comments on commit 6d8bd73

Please sign in to comment.