UNPKG

@wordpress/editor

Version:
23 lines (20 loc) 585 B
import { render, screen } from '@testing-library/react'; import { SlotFillProvider } from '@wordpress/components'; import PluginPrePublishPanel from '../'; describe( 'PluginPrePublishPanel', () => { test( 'renders fill properly', () => { render( <SlotFillProvider> <PluginPrePublishPanel className="my-plugin-pre-publish-panel" title="My panel title" initialOpen > My panel content </PluginPrePublishPanel> <PluginPrePublishPanel.Slot /> </SlotFillProvider> ); expect( screen.getByText( 'My panel title' ) ).toBeVisible(); } ); } );