Skip to content

Commit

Permalink
Editor: Fix tests that relied on registry selectors being higher order.
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras authored and aduth committed Jul 31, 2019
1 parent 7bbe1e0 commit 5c3442b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/editor/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const {
isCurrentPostScheduled,
isEditedPostPublishable,
isEditedPostSaveable,
isEditedPostAutosaveable: isEditedPostAutosaveableRegistrySelector,
isEditedPostAutosaveable: _isEditedPostAutosaveableRegistrySelector,
isEditedPostEmpty,
isEditedPostBeingScheduled,
isEditedPostDateFloating,
Expand All @@ -71,9 +71,14 @@ const {

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

beforeAll( () => {
cachedSelectors = filter( selectors, ( selector ) => selector.clear );
isEditedPostAutosaveableRegistrySelector = ( select ) => {
_isEditedPostAutosaveableRegistrySelector.registry = { select };
return _isEditedPostAutosaveableRegistrySelector;
};
} );

beforeEach( () => {
Expand Down

0 comments on commit 5c3442b

Please sign in to comment.