From e9855d2853529cf1e276a4df7348acb5ba09f44c Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Fri, 9 Jun 2023 14:28:19 +1000 Subject: [PATCH] Fix block-editor selector tests --- packages/block-editor/src/store/test/private-selectors.js | 4 ++-- packages/block-editor/src/store/test/selectors.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/store/test/private-selectors.js b/packages/block-editor/src/store/test/private-selectors.js index 1dae0a21e06b12..c6dac371692f7e 100644 --- a/packages/block-editor/src/store/test/private-selectors.js +++ b/packages/block-editor/src/store/test/private-selectors.js @@ -122,9 +122,9 @@ describe( 'private selectors', () => { () => false ); getBlockEditingMode.registry = { - select: jest.fn( () => ( { + select: () => ( { __experimentalHasContentRoleAttribute, - } ) ), + } ), }; it( 'should return default by default', () => { diff --git a/packages/block-editor/src/store/test/selectors.js b/packages/block-editor/src/store/test/selectors.js index 5cc17fc08b3142..652a9307bf18a0 100644 --- a/packages/block-editor/src/store/test/selectors.js +++ b/packages/block-editor/src/store/test/selectors.js @@ -73,6 +73,13 @@ const { wasBlockJustInserted, __experimentalGetGlobalBlocksByName, } = selectors; +import { getBlockEditingMode } from '../private-selectors'; + +getBlockEditingMode.registry = { + select: () => ( { + __experimentalHasContentRoleAttribute: jest.fn( () => false ), + } ), +}; describe( 'selectors', () => { let cachedSelectors;