From f22d37d5cbfb8d0245e437fa4a691fa5a47a813d Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Fri, 25 Aug 2023 14:02:51 +0200 Subject: [PATCH] Fixup unprocessedBlockTypes reducer tests --- packages/blocks/src/store/test/reducer.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/blocks/src/store/test/reducer.js b/packages/blocks/src/store/test/reducer.js index b4312d0fd7df2..5664f9d876cb6 100644 --- a/packages/blocks/src/store/test/reducer.js +++ b/packages/blocks/src/store/test/reducer.js @@ -31,24 +31,25 @@ describe( 'unprocessedBlockTypes', () => { it( 'should add a new block type', () => { const original = deepFreeze( { - 'core/paragraph': { name: 'core/paragraph' }, + 'core/paragraph': { title: 'Paragraph' }, } ); const state = unprocessedBlockTypes( original, { type: 'ADD_UNPROCESSED_BLOCK_TYPE', - blockType: { name: 'core/code' }, + name: 'core/code', + blockType: { title: 'Code' }, } ); expect( state ).toEqual( { - 'core/paragraph': { name: 'core/paragraph' }, - 'core/code': { name: 'core/code' }, + 'core/paragraph': { title: 'Paragraph' }, + 'core/code': { title: 'Code' }, } ); } ); it( 'should remove unprocessed block types', () => { const original = deepFreeze( { - 'core/paragraph': { name: 'core/paragraph' }, - 'core/code': { name: 'core/code' }, + 'core/paragraph': { title: 'Paragraph' }, + 'core/code': { title: 'Code' }, } ); const state = blockTypes( original, { @@ -57,7 +58,7 @@ describe( 'unprocessedBlockTypes', () => { } ); expect( state ).toEqual( { - 'core/paragraph': { name: 'core/paragraph' }, + 'core/paragraph': { title: 'Paragraph' }, } ); } ); } );