import React from 'react' import { render } from '@testing-library/react' import { GridComponentsProvider, useGridComponents } from '.' const Sample = () => { const { GridLayout } = useGridComponents() return } const DivGrid = ({ children }: { children?: React.ReactNode }) => (
{children}
) describe('GridComponentsContext', () => { it('should provide default for components', () => { const { getByRole } = render() expect(getByRole('table')).toBeInTheDocument() }) it('should allow a component to be overridden', () => { const { getByRole } = render( ) expect(getByRole('grid')).toBeInTheDocument() }) })