test: Clean up QueryList test warnings (#22972)

This commit is contained in:
Lyndsi Kay Williams 2023-02-03 07:27:15 -06:00 committed by GitHub
parent 39f15b8d95
commit 4970df0a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -35,6 +35,14 @@ import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light';
import SubMenu from 'src/views/components/SubMenu';
import { QueryState } from '@superset-ui/core';
jest.mock('src/components/Icons/Icon', () => ({
__esModule: true,
default: ({ fileName, role }: { fileName: string; role: string }) => (
<span role={role ?? 'img'} aria-label={fileName.replace('_', '-')} />
),
StyledIcon: () => <span />,
}));
// store needed for withToasts
const mockStore = configureStore([thunk]);
const store = mockStore({});