From a42df58f966a9629b306c1dd07c16dfc887988a1 Mon Sep 17 00:00:00 2001 From: Tim Gardner Date: Wed, 29 Nov 2017 15:35:21 +1000 Subject: [PATCH] Fix tests --- blocks/block-edit/index.js | 1 + blocks/block-edit/test/index.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/blocks/block-edit/index.js b/blocks/block-edit/index.js index a35348c2325ff..5dee2b1e1badd 100644 --- a/blocks/block-edit/index.js +++ b/blocks/block-edit/index.js @@ -23,6 +23,7 @@ function BlockEdit( props ) { const filteredElements = applyFilters( 'BlockEdit', { edit: , fragments: [] }, props ); if ( filteredElements.edit.type !== Edit ) { + // eslint-disable-next-line no-console console.error( 'edit must be a ' + Edit.toString() ); } diff --git a/blocks/block-edit/test/index.js b/blocks/block-edit/test/index.js index c24648e6f4795..1cb7e152ed04c 100644 --- a/blocks/block-edit/test/index.js +++ b/blocks/block-edit/test/index.js @@ -24,7 +24,7 @@ describe( 'BlockEdit', () => { it( 'should return null if block type not defined', () => { const wrapper = shallow( ); - expect( wrapper.type() ).toBe( null ); + expect( wrapper.first().type() ).toBe( null ); } ); it( 'should use edit implementation of block', () => { @@ -38,7 +38,7 @@ describe( 'BlockEdit', () => { const wrapper = shallow( ); - expect( wrapper.type() ).toBe( edit ); + expect( wrapper.first().type() ).toBe( edit ); } ); it( 'should use save implementation of block as fallback', () => { @@ -51,6 +51,6 @@ describe( 'BlockEdit', () => { const wrapper = shallow( ); - expect( wrapper.type() ).toBe( save ); + expect( wrapper.first().type() ).toBe( save ); } ); } );