2025-04-01 10:38:02 +09:00

26 lines
631 B
TypeScript

import { PropsWithChildren } from 'react';
import { QueryLibraryContext } from './QueryLibraryContext';
type Props = {
queryLibraryAvailable?: boolean;
};
export function QueryLibraryContextProviderMock(props: PropsWithChildren<Props>) {
return (
<QueryLibraryContext.Provider
value={{
openDrawer: jest.fn(),
closeDrawer: jest.fn(),
isDrawerOpen: false,
openAddQueryModal: jest.fn(),
closeAddQueryModal: jest.fn(),
renderSaveQueryButton: jest.fn(),
queryLibraryEnabled: false,
}}
>
{props.children}
</QueryLibraryContext.Provider>
);
}