diff --git a/packages/block-editor/src/components/inserter/test/block-types-tab.native.js b/packages/block-editor/src/components/inserter/test/block-types-tab.native.js index c424c85e1ce01..d6979decc39f5 100644 --- a/packages/block-editor/src/components/inserter/test/block-types-tab.native.js +++ b/packages/block-editor/src/components/inserter/test/block-types-tab.native.js @@ -24,7 +24,7 @@ const selectMock = { canInsertBlockType: jest.fn(), getBlockType: jest.fn(), getClipboard: jest.fn(), - getSettings: jest.fn( () => ( {} ) ), + getSettings: jest.fn( () => ( { impressions: {} } ) ), }; describe( 'BlockTypesTab component', () => { @@ -48,10 +48,14 @@ describe( 'BlockTypesTab component', () => { it( 'shows block items', () => { selectMock.getInserterItems.mockReturnValue( items ); - const blockItems = items.filter( - ( { id, category } ) => - category !== 'reusable' && id !== 'core-embed/a-paragraph-embed' - ); + const blockItems = items + .filter( + ( { id, category } ) => + category !== 'reusable' && + id !== 'core-embed/a-paragraph-embed' + ) + // Set `isNew` property expected from block type impressions + .map( ( filteredItems ) => ( { ...filteredItems, isNew: false } ) ); const component = shallow(