Skip to content

Commit

Permalink
fix test types
Browse files Browse the repository at this point in the history
  • Loading branch information
george-cz committed Jun 25, 2024
1 parent 816315b commit 88da3ad
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { isConformant } from '../../testing/isConformant';
import { List } from './List';
import { ListProps } from './List.types';
import { ListItem } from '../ListItem/ListItem';
import { ListItemActionEvent } from '../../events/ListItemActionEvent';
import { ListItemActionEventData } from '../ListItem/ListItem.types';
import { EventHandler } from '@fluentui/react-utilities';

function expectListboxItemSelected(item: HTMLElement, selected: boolean) {
expect(item.getAttribute('aria-selected')).toBe(selected.toString());
Expand Down Expand Up @@ -360,7 +361,7 @@ describe('List', () => {
describe('with selection', () => {
function interactWithFirstElement(
interaction: (firstItem: HTMLElement) => void,
customAction?: (e: ListItemActionEvent) => void,
customAction?: EventHandler<ListItemActionEventData>,
) {
const onAction = jest.fn(customAction);

Expand Down Expand Up @@ -505,8 +506,8 @@ describe('List', () => {
});

describe('with selection', () => {
function pressOnListItem(key: string, customOnaction?: (e: ListItemActionEvent) => void) {
const onAction = jest.fn(customOnaction);
function pressOnListItem(key: string, customOnAction?: EventHandler<ListItemActionEventData>) {
const onAction = jest.fn(customOnAction);

const result = render(
<List selectionMode="multiselect">
Expand Down

0 comments on commit 88da3ad

Please sign in to comment.