Skip to content

Commit

Permalink
Fix block-editor selector tests
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed Jun 9, 2023
1 parent 41c2532 commit e9855d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-editor/src/store/test/private-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ describe( 'private selectors', () => {
() => false
);
getBlockEditingMode.registry = {
select: jest.fn( () => ( {
select: () => ( {
__experimentalHasContentRoleAttribute,
} ) ),
} ),
};

it( 'should return default by default', () => {
Expand Down
7 changes: 7 additions & 0 deletions packages/block-editor/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ const {
wasBlockJustInserted,
__experimentalGetGlobalBlocksByName,
} = selectors;
import { getBlockEditingMode } from '../private-selectors';

getBlockEditingMode.registry = {
select: () => ( {
__experimentalHasContentRoleAttribute: jest.fn( () => false ),
} ),
};

describe( 'selectors', () => {
let cachedSelectors;
Expand Down

0 comments on commit e9855d2

Please sign in to comment.