Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tg-ephox committed Nov 29, 2017
1 parent 59b3ea2 commit a42df58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions blocks/block-edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function BlockEdit( props ) {
const filteredElements = applyFilters( 'BlockEdit', { edit: <Edit key="edit" { ...editProps } />, fragments: [] }, props );

if ( filteredElements.edit.type !== Edit ) {
// eslint-disable-next-line no-console
console.error( 'edit must be a ' + Edit.toString() );
}

Expand Down
6 changes: 3 additions & 3 deletions blocks/block-edit/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe( 'BlockEdit', () => {
it( 'should return null if block type not defined', () => {
const wrapper = shallow( <BlockEdit name="core/test-block" /> );

expect( wrapper.type() ).toBe( null );
expect( wrapper.first().type() ).toBe( null );
} );

it( 'should use edit implementation of block', () => {
Expand All @@ -38,7 +38,7 @@ describe( 'BlockEdit', () => {

const wrapper = shallow( <BlockEdit name="core/test-block" /> );

expect( wrapper.type() ).toBe( edit );
expect( wrapper.first().type() ).toBe( edit );
} );

it( 'should use save implementation of block as fallback', () => {
Expand All @@ -51,6 +51,6 @@ describe( 'BlockEdit', () => {

const wrapper = shallow( <BlockEdit name="core/test-block" /> );

expect( wrapper.type() ).toBe( save );
expect( wrapper.first().type() ).toBe( save );
} );
} );

0 comments on commit a42df58

Please sign in to comment.