Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit d0e6435

Browse files
committed
fixed typo
1 parent 4ee1472 commit d0e6435

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

packages/core/tests/unit/collection/collection.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,24 @@ describe('Collection Tests', () => {
12861286
});
12871287
});
12881288

1289+
describe('select function tests', () => {
1290+
beforeEach(() => {
1291+
collection.createSelector = jest.fn();
1292+
});
1293+
it(
1294+
'should call createSelector with the specified itemKey ' +
1295+
'as key of the Selector and as selected item key',
1296+
() => {
1297+
collection.select('test');
1298+
1299+
expect(collection.createSelector).toHaveBeenCalledWith(
1300+
'test',
1301+
'test'
1302+
);
1303+
}
1304+
);
1305+
});
1306+
12891307
describe('hasSelector function tests', () => {
12901308
let dummySelector: Selector<ItemInterface>;
12911309

packages/react/src/hooks/useWatcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
2-
import { StateWatcherCallback, State } from '@agile-ts/core';
2+
import { StateWatcherCallback, EnhancedState } from '@agile-ts/core';
33

44
export function useWatcher<T = any>(
5-
state: State<T>,
5+
state: EnhancedState<T>,
66
callback: StateWatcherCallback<T>
77
): void {
88
React.useEffect(() => {

0 commit comments

Comments
 (0)