Skip to content

Commit

Permalink
test: Fix act errors in DatasourceControl test (#22845)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndsiWilliams authored Jan 25, 2023
1 parent 050cbe9 commit ddd5cd3
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ import DatasourceControl from '.';

const SupersetClientGet = jest.spyOn(SupersetClient, 'get');

jest.mock('src/components/Icons/Icon', () => ({
__esModule: true,
default: ({
fileName,
role,
...rest
}: {
fileName: string;
role: string;
}) => (
<span
role={role ?? 'img'}
aria-label={fileName.replace('_', '-')}
{...rest}
/>
),
StyledIcon: () => <span />,
}));

const createProps = (overrides: JsonObject = {}) => ({
hovered: false,
type: 'DatasourceControl',
Expand Down

0 comments on commit ddd5cd3

Please sign in to comment.