Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Jul 8, 2024
1 parent ae7d829 commit 5dc19e6
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions packages/block-editor/src/components/block-edit/test/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { render, screen } from '@testing-library/react';
import {
registerBlockType,
unregisterBlockType,
registerBlockVariation,
unregisterBlockVariation,
getBlockTypes,
} from '@wordpress/blocks';

Expand Down Expand Up @@ -108,15 +106,16 @@ describe( 'Edit', () => {
variation: true,
},
},
} );

registerBlockVariation( 'core/test-block', {
name: 'variation',
title: 'block variation title',
attributes: {
fruit: 'Bananas',
},
isActive: [ 'fruit' ],
variations: [
{
name: 'variation',
title: 'block variation title',
attributes: {
fruit: 'Bananas',
},
isActive: [ 'fruit' ],
},
],
} );

render(
Expand All @@ -126,8 +125,6 @@ describe( 'Edit', () => {
const editElement = screen.getByTestId( 'foo-bar' );
expect( editElement ).toHaveClass( 'wp-block-test-block' );
expect( editElement ).toHaveClass( 'wp-block-test-block-variation' );

unregisterBlockVariation( 'core/test-block', 'variation' );
} );

it( 'should assign context', () => {
Expand Down

0 comments on commit 5dc19e6

Please sign in to comment.