Skip to content

Commit

Permalink
fix interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaanj committed Dec 12, 2023
1 parent c86d7ff commit 308a869
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { renderHook } from '@epam/uui-test-utils';
import { UseColumnsConfigurationProps, useColumnsConfiguration } from '../hooks/useColumnsConfiguration';
import { useColumnsConfiguration } from '../hooks/useColumnsConfiguration';
import { ColumnsConfig, DataColumnProps } from '@epam/uui-core';

const initialColumnsConfig = {
name: {
Expand Down Expand Up @@ -109,10 +110,10 @@ const columns = [
describe('useColumnsConfiguration', () => {
it('should render hook', () => {
const { result } = renderHook(() => useColumnsConfiguration({
initialColumnsConfig,
defaultConfig,
columns,
} as UseColumnsConfigurationProps<any, any, any>));
initialColumnsConfig: initialColumnsConfig as ColumnsConfig,
defaultConfig: defaultConfig as ColumnsConfig,
columns: columns as DataColumnProps<any, any, any>[],
}));

expect(result.current.columnsConfig).toEqual(initialColumnsConfig);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { canAcceptDrop, isColumnAlwaysPinned } from '../columnsConfigurationUtil
import { DndDataType, GroupedDataColumnProps, ColumnsConfigurationRowProps } from '../types';
import { groupAndFilterSortedColumns, sortColumnsAndAddGroupKey } from '../columnsConfigurationUtils';

export interface UseColumnsConfigurationProps<TItem, TId, TFilter> {
interface UseColumnsConfigurationProps<TItem, TId, TFilter> {
initialColumnsConfig: ColumnsConfig;
defaultConfig: ColumnsConfig;
columns: DataColumnProps<TItem, TId, TFilter>[];
Expand Down

0 comments on commit 308a869

Please sign in to comment.