Skip to content

Commit

Permalink
Fixup unprocessedBlockTypes reducer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Aug 28, 2023
1 parent ff93ba9 commit f22d37d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/blocks/src/store/test/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand All @@ -57,7 +58,7 @@ describe( 'unprocessedBlockTypes', () => {
} );

expect( state ).toEqual( {
'core/paragraph': { name: 'core/paragraph' },
'core/paragraph': { title: 'Paragraph' },
} );
} );
} );
Expand Down

0 comments on commit f22d37d

Please sign in to comment.