@wordpress/editor
Version:
Enhanced block editor for WordPress posts.
23 lines (20 loc) • 582 B
JavaScript
import { render } from '@testing-library/react';
import { SlotFillProvider } from '@wordpress/components';
import PluginPostPublishPanel from '../';
describe( 'PluginPostPublishPanel', () => {
test( 'renders fill properly', () => {
const { container } = render(
<SlotFillProvider>
<PluginPostPublishPanel
className="my-plugin-post-publish-panel"
title="My panel title"
initialOpen
>
My panel content
</PluginPostPublishPanel>
<PluginPostPublishPanel.Slot />
</SlotFillProvider>
);
expect( container ).toMatchSnapshot();
} );
} );