Skip to content

Commit

Permalink
Remove obsolete unit test.
Browse files Browse the repository at this point in the history
getNearestBlockIndex now assumes all elements passed to it are the root elements of blocks; we filter out the other elements before passing the array to the function.
  • Loading branch information
ZebulanStanphill committed Aug 7, 2020
1 parent 312f800 commit 86fd186
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,6 @@ describe( 'getNearestBlockIndex', () => {
expect( result ).toBeUndefined();
} );

it( 'returns `undefined` if the elements do not have the `wp-block` class', () => {
const nonBlockElements = [
{ classList: createMockClassList( 'some-other-class' ) },
];
const position = { x: 0, y: 0 };
const orientation = 'horizontal';

const result = getNearestBlockIndex(
nonBlockElements,
position,
orientation
);

expect( result ).toBeUndefined();
} );

describe( 'Vertical block lists', () => {
const orientation = 'vertical';

Expand Down

0 comments on commit 86fd186

Please sign in to comment.