Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add unit tests
  • Loading branch information
Mamaduka committed Apr 29, 2022
commit b8a8b052d4b3de07a32e3f6920e211f4d8a425fe
17 changes: 17 additions & 0 deletions packages/block-editor/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -3093,6 +3093,23 @@ describe( 'selectors', () => {
] )
);
} );
it( 'should support single block object', () => {
const state = {
blocks: {
byClientId: {},
attributes: {},
order: {},
parents: {},
cache: {},
},
settings: {},
preferences: {},
blockListSettings: {},
};
const block = { name: 'core/with-tranforms-a' };
const items = getBlockTransformItems( state, block );
expect( items ).toHaveLength( 2 );
} );
it( 'should return only eligible blocks for transformation - `allowedBlocks`', () => {
const state = {
blocks: {
Expand Down