Skip to content
Merged
Prev Previous commit
Next Next commit
Add action unit tests
  • Loading branch information
glendaviesnz committed Oct 24, 2022
commit af8b01cf547b0c94ff08c35ea660254f39f62c20
18 changes: 18 additions & 0 deletions packages/block-editor/src/store/test/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const noop = () => {};

const {
clearSelectedBlock,
hideBlockToolbar,
insertBlock,
insertBlocks,
mergeBlocks,
Expand All @@ -39,6 +40,7 @@ const {
replaceInnerBlocks,
resetBlocks,
selectBlock,
showBlockToolbar,
showInsertionPoint,
startMultiSelect,
startTyping,
Expand Down Expand Up @@ -775,6 +777,22 @@ describe( 'actions', () => {
} );
} );

describe( 'hideBlockToolbar', () => {
it( 'should return the HIDE_BLOCK_TOOLBAR action', () => {
expect( hideBlockToolbar() ).toEqual( {
type: 'HIDE_BLOCK_TOOLBAR',
} );
} );
} );

describe( 'showBlockToolbar', () => {
it( 'should return the SHOW_BLOCK_TOOLBAR action', () => {
expect( showBlockToolbar() ).toEqual( {
type: 'SHOW_BLOCK_TOOLBAR',
} );
} );
} );

describe( 'startTyping', () => {
it( 'should return the START_TYPING action', () => {
expect( startTyping() ).toEqual( {
Expand Down