Skip to content

Commit

Permalink
Add a test for the custom className
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Sep 13, 2022
1 parent 661a5e5 commit 92c26ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/block-editor/src/components/block-icon/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ describe( 'BlockIcon', () => {
expect( container.firstChild ).toHaveClass( 'has-colors' );
} );

it( 'supports adding a className to the wrapper', () => {
const { container } = render(
<BlockIcon icon={ image } className="foo-bar" />
);

expect( container.firstChild ).toHaveClass( 'foo-bar' );
} );

it( 'skips adding background and foreground styles when colors are not enabled', () => {
const { container } = render(
<BlockIcon
Expand Down

0 comments on commit 92c26ea

Please sign in to comment.