@wordpress/data 6.5.0 → 6.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { merge, isPlainObject } from 'lodash';
4
+ import { merge, isPlainObject, identity } from 'lodash';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
@@ -300,40 +300,53 @@ export function migrateFeaturePreferencesToPreferencesStore(
300
300
  }
301
301
  }
302
302
 
303
+ /**
304
+ * Migrates an individual item inside the `preferences` object for a store.
305
+ *
306
+ * @param {Object} persistence The persistence interface.
307
+ * @param {Object} migrate An options object that contains details of the migration.
308
+ * @param {string} migrate.from The name of the store to migrate from.
309
+ * @param {string} migrate.scope The scope in the preferences store to migrate to.
310
+ * @param {string} key The key in the preferences object to migrate.
311
+ * @param {?Function} convert A function that converts preferences from one format to another.
312
+ */
303
313
  export function migrateIndividualPreferenceToPreferencesStore(
304
314
  persistence,
305
- sourceStoreName,
306
- key
315
+ { from: sourceStoreName, scope },
316
+ key,
317
+ convert = identity
307
318
  ) {
308
319
  const preferencesStoreName = 'core/preferences';
309
320
  const state = persistence.get();
310
321
  const sourcePreference = state[ sourceStoreName ]?.preferences?.[ key ];
311
322
 
312
323
  // There's nothing to migrate, exit early.
313
- if ( ! sourcePreference ) {
324
+ if ( sourcePreference === undefined ) {
314
325
  return;
315
326
  }
316
327
 
317
328
  const targetPreference =
318
- state[ preferencesStoreName ]?.preferences?.[ sourceStoreName ]?.[
319
- key
320
- ];
329
+ state[ preferencesStoreName ]?.preferences?.[ scope ]?.[ key ];
321
330
 
322
331
  // There's existing data at the target, so don't overwrite it, exit early.
323
332
  if ( targetPreference ) {
324
333
  return;
325
334
  }
326
335
 
327
- const allPreferences = state[ preferencesStoreName ]?.preferences;
328
- const targetPreferences =
329
- state[ preferencesStoreName ]?.preferences?.[ sourceStoreName ];
336
+ const otherScopes = state[ preferencesStoreName ]?.preferences;
337
+ const otherPreferences =
338
+ state[ preferencesStoreName ]?.preferences?.[ scope ];
339
+
340
+ // Pass an object with the key and value as this allows the convert
341
+ // function to convert to a data structure that has different keys.
342
+ const convertedPreferences = convert( { [ key ]: sourcePreference } );
330
343
 
331
344
  persistence.set( preferencesStoreName, {
332
345
  preferences: {
333
- ...allPreferences,
334
- [ sourceStoreName ]: {
335
- ...targetPreferences,
336
- [ key ]: sourcePreference,
346
+ ...otherScopes,
347
+ [ scope ]: {
348
+ ...otherPreferences,
349
+ ...convertedPreferences,
337
350
  },
338
351
  },
339
352
  } );
@@ -350,6 +363,57 @@ export function migrateIndividualPreferenceToPreferencesStore(
350
363
  } );
351
364
  }
352
365
 
366
+ /**
367
+ * Convert from:
368
+ * ```
369
+ * {
370
+ * panels: {
371
+ * tags: {
372
+ * enabled: true,
373
+ * opened: true,
374
+ * },
375
+ * permalinks: {
376
+ * enabled: false,
377
+ * opened: false,
378
+ * },
379
+ * },
380
+ * }
381
+ * ```
382
+ *
383
+ * to:
384
+ * {
385
+ * inactivePanels: [
386
+ * 'permalinks',
387
+ * ],
388
+ * openPanels: [
389
+ * 'tags',
390
+ * ],
391
+ * }
392
+ *
393
+ * @param {Object} preferences A preferences object.
394
+ *
395
+ * @return {Object} The converted data.
396
+ */
397
+ export function convertEditPostPanels( preferences ) {
398
+ const panels = preferences?.panels ?? {};
399
+ return Object.keys( panels ).reduce(
400
+ ( convertedData, panelName ) => {
401
+ const panel = panels[ panelName ];
402
+
403
+ if ( panel?.enabled === false ) {
404
+ convertedData.inactivePanels.push( panelName );
405
+ }
406
+
407
+ if ( panel?.opened === true ) {
408
+ convertedData.openPanels.push( panelName );
409
+ }
410
+
411
+ return convertedData;
412
+ },
413
+ { inactivePanels: [], openPanels: [] }
414
+ );
415
+ }
416
+
353
417
  export function migrateThirdPartyFeaturePreferencesToPreferencesStore(
354
418
  persistence
355
419
  ) {
@@ -366,7 +430,7 @@ export function migrateThirdPartyFeaturePreferencesToPreferencesStore(
366
430
  continue;
367
431
  }
368
432
 
369
- // Skip this scope if there are no features to migrates
433
+ // Skip this scope if there are no features to migrate.
370
434
  const featuresToMigrate = interfaceScopes[ scope ];
371
435
  if ( ! featuresToMigrate ) {
372
436
  continue;
@@ -402,6 +466,125 @@ export function migrateThirdPartyFeaturePreferencesToPreferencesStore(
402
466
  }
403
467
  }
404
468
 
469
+ /**
470
+ * Migrates interface 'enableItems' data to the preferences store.
471
+ *
472
+ * The interface package stores this data in this format:
473
+ * ```js
474
+ * {
475
+ * enableItems: {
476
+ * singleEnableItems: {
477
+ * complementaryArea: {
478
+ * 'core/edit-post': 'edit-post/document',
479
+ * 'core/edit-site': 'edit-site/global-styles',
480
+ * }
481
+ * },
482
+ * multipleEnableItems: {
483
+ * pinnedItems: {
484
+ * 'core/edit-post': {
485
+ * 'plugin-1': true,
486
+ * },
487
+ * 'core/edit-site': {
488
+ * 'plugin-2': true,
489
+ * },
490
+ * },
491
+ * }
492
+ * }
493
+ * }
494
+ * ```
495
+ * and it should be migrated it to:
496
+ * ```js
497
+ * {
498
+ * 'core/edit-post': {
499
+ * complementaryArea: 'edit-post/document',
500
+ * pinnedItems: {
501
+ * 'plugin-1': true,
502
+ * },
503
+ * },
504
+ * 'core/edit-site': {
505
+ * complementaryArea: 'edit-site/global-styles',
506
+ * pinnedItems: {
507
+ * 'plugin-2': true,
508
+ * },
509
+ * },
510
+ * }
511
+ * ```
512
+ *
513
+ * @param {Object} persistence The persistence interface.
514
+ */
515
+ export function migrateInterfaceEnableItemsToPreferencesStore( persistence ) {
516
+ const interfaceStoreName = 'core/interface';
517
+ const preferencesStoreName = 'core/preferences';
518
+ const state = persistence.get();
519
+ const sourceEnableItems = state[ interfaceStoreName ]?.enableItems;
520
+
521
+ // There's nothing to migrate, exit early.
522
+ if ( ! sourceEnableItems ) {
523
+ return;
524
+ }
525
+
526
+ const allPreferences = state[ preferencesStoreName ]?.preferences ?? {};
527
+
528
+ // First convert complementaryAreas into the right format.
529
+ // Use the existing preferences as the accumulator so that the data is
530
+ // merged.
531
+ const sourceComplementaryAreas =
532
+ sourceEnableItems?.singleEnableItems?.complementaryArea ?? {};
533
+
534
+ const convertedComplementaryAreas = Object.keys(
535
+ sourceComplementaryAreas
536
+ ).reduce( ( accumulator, scope ) => {
537
+ const data = sourceComplementaryAreas[ scope ];
538
+
539
+ // Don't overwrite any existing data in the preferences store.
540
+ if ( accumulator[ scope ]?.complementaryArea ) {
541
+ return accumulator;
542
+ }
543
+
544
+ return {
545
+ ...accumulator,
546
+ [ scope ]: {
547
+ ...accumulator[ scope ],
548
+ complementaryArea: data,
549
+ },
550
+ };
551
+ }, allPreferences );
552
+
553
+ // Next feed the converted complementary areas back into a reducer that
554
+ // converts the pinned items, resulting in the fully migrated data.
555
+ const sourcePinnedItems =
556
+ sourceEnableItems?.multipleEnableItems?.pinnedItems ?? {};
557
+ const allConvertedData = Object.keys( sourcePinnedItems ).reduce(
558
+ ( accumulator, scope ) => {
559
+ const data = sourcePinnedItems[ scope ];
560
+ // Don't overwrite any existing data in the preferences store.
561
+ if ( accumulator[ scope ]?.pinnedItems ) {
562
+ return accumulator;
563
+ }
564
+
565
+ return {
566
+ ...accumulator,
567
+ [ scope ]: {
568
+ ...accumulator[ scope ],
569
+ pinnedItems: data,
570
+ },
571
+ };
572
+ },
573
+ convertedComplementaryAreas
574
+ );
575
+
576
+ persistence.set( preferencesStoreName, {
577
+ preferences: allConvertedData,
578
+ } );
579
+
580
+ // Remove migrated preferences.
581
+ const otherInterfaceItems = state[ interfaceStoreName ];
582
+ persistence.set( interfaceStoreName, {
583
+ ...otherInterfaceItems,
584
+ enableItems: undefined,
585
+ } );
586
+ }
587
+
405
588
  persistencePlugin.__unstableMigrate = ( pluginOptions ) => {
406
589
  const persistence = createPersistenceInterface( pluginOptions );
407
590
 
@@ -427,24 +610,36 @@ persistencePlugin.__unstableMigrate = ( pluginOptions ) => {
427
610
  // Other ad-hoc preferences.
428
611
  migrateIndividualPreferenceToPreferencesStore(
429
612
  persistence,
430
- 'core/edit-post',
613
+ { from: 'core/edit-post', scope: 'core/edit-post' },
431
614
  'hiddenBlockTypes'
432
615
  );
433
616
  migrateIndividualPreferenceToPreferencesStore(
434
617
  persistence,
435
- 'core/edit-post',
618
+ { from: 'core/edit-post', scope: 'core/edit-post' },
436
619
  'editorMode'
437
620
  );
438
621
  migrateIndividualPreferenceToPreferencesStore(
439
622
  persistence,
440
- 'core/edit-post',
623
+ { from: 'core/edit-post', scope: 'core/edit-post' },
441
624
  'preferredStyleVariations'
442
625
  );
443
626
  migrateIndividualPreferenceToPreferencesStore(
444
627
  persistence,
445
- 'core/edit-site',
628
+ { from: 'core/edit-post', scope: 'core/edit-post' },
629
+ 'panels',
630
+ convertEditPostPanels
631
+ );
632
+ migrateIndividualPreferenceToPreferencesStore(
633
+ persistence,
634
+ { from: 'core/editor', scope: 'core/edit-post' },
635
+ 'isPublishSidebarEnabled'
636
+ );
637
+ migrateIndividualPreferenceToPreferencesStore(
638
+ persistence,
639
+ { from: 'core/edit-site', scope: 'core/edit-site' },
446
640
  'editorMode'
447
641
  );
642
+ migrateInterfaceEnableItemsToPreferencesStore( persistence );
448
643
  };
449
644
 
450
645
  export default persistencePlugin;
@@ -12,6 +12,8 @@ import plugin, {
12
12
  migrateFeaturePreferencesToPreferencesStore,
13
13
  migrateThirdPartyFeaturePreferencesToPreferencesStore,
14
14
  migrateIndividualPreferenceToPreferencesStore,
15
+ convertEditPostPanels,
16
+ migrateInterfaceEnableItemsToPreferencesStore,
15
17
  } from '../';
16
18
  import objectStorage from '../storage/object';
17
19
  import { createRegistry } from '../../../';
@@ -692,7 +694,7 @@ describe( 'migrateIndividualPreferenceToPreferencesStore', () => {
692
694
 
693
695
  migrateIndividualPreferenceToPreferencesStore(
694
696
  persistenceInterface,
695
- 'core/test',
697
+ { from: 'core/test', scope: 'core/test' },
696
698
  'myPreference'
697
699
  );
698
700
 
@@ -741,7 +743,7 @@ describe( 'migrateIndividualPreferenceToPreferencesStore', () => {
741
743
 
742
744
  migrateIndividualPreferenceToPreferencesStore(
743
745
  persistenceInterface,
744
- 'core/test',
746
+ { from: 'core/test', scope: 'core/test' },
745
747
  'myPreference'
746
748
  );
747
749
 
@@ -769,6 +771,41 @@ describe( 'migrateIndividualPreferenceToPreferencesStore', () => {
769
771
  } );
770
772
  } );
771
773
 
774
+ it( 'supports moving data to a scope that is differently named to the source store', () => {
775
+ const persistenceInterface = createPersistenceInterface( {
776
+ storageKey: 'test-username',
777
+ } );
778
+
779
+ const initialState = {
780
+ preferences: {
781
+ myPreference: '123',
782
+ },
783
+ };
784
+
785
+ persistenceInterface.set( 'core/source', initialState );
786
+
787
+ migrateIndividualPreferenceToPreferencesStore(
788
+ persistenceInterface,
789
+ { from: 'core/source', scope: 'core/destination' },
790
+ 'myPreference'
791
+ );
792
+
793
+ expect( persistenceInterface.get() ).toEqual( {
794
+ 'core/preferences': {
795
+ preferences: {
796
+ 'core/destination': {
797
+ myPreference: '123',
798
+ },
799
+ },
800
+ },
801
+ 'core/source': {
802
+ preferences: {
803
+ myPreference: undefined,
804
+ },
805
+ },
806
+ } );
807
+ } );
808
+
772
809
  it( 'does not migrate data if there is already a matching preference key at the target', () => {
773
810
  const persistenceInterface = createPersistenceInterface( {
774
811
  storageKey: 'test-username',
@@ -790,7 +827,7 @@ describe( 'migrateIndividualPreferenceToPreferencesStore', () => {
790
827
 
791
828
  migrateIndividualPreferenceToPreferencesStore(
792
829
  persistenceInterface,
793
- 'core/test',
830
+ { from: 'core/test', scope: 'core/test' },
794
831
  'myPreference'
795
832
  );
796
833
 
@@ -809,6 +846,37 @@ describe( 'migrateIndividualPreferenceToPreferencesStore', () => {
809
846
  },
810
847
  } );
811
848
  } );
849
+
850
+ it( 'migrates preferences that have a `false` value', () => {
851
+ const persistenceInterface = createPersistenceInterface( {
852
+ storageKey: 'test-username',
853
+ } );
854
+
855
+ persistenceInterface.set( 'core/test', {
856
+ preferences: {
857
+ myFalsePreference: false,
858
+ },
859
+ } );
860
+
861
+ migrateIndividualPreferenceToPreferencesStore(
862
+ persistenceInterface,
863
+ { from: 'core/test', scope: 'core/test' },
864
+ 'myFalsePreference'
865
+ );
866
+
867
+ expect( persistenceInterface.get() ).toEqual( {
868
+ 'core/preferences': {
869
+ preferences: {
870
+ 'core/test': {
871
+ myFalsePreference: false,
872
+ },
873
+ },
874
+ },
875
+ 'core/test': {
876
+ preferences: {},
877
+ },
878
+ } );
879
+ } );
812
880
  } );
813
881
 
814
882
  describe( 'migrateThirdPartyFeaturePreferencesToPreferencesStore', () => {
@@ -923,3 +991,165 @@ describe( 'migrateThirdPartyFeaturePreferencesToPreferencesStore', () => {
923
991
  } );
924
992
  } );
925
993
  } );
994
+
995
+ describe( 'convertEditPostPanels', () => {
996
+ it( 'converts from one format to another', () => {
997
+ expect(
998
+ convertEditPostPanels( {
999
+ panels: {
1000
+ tags: {
1001
+ enabled: true,
1002
+ opened: true,
1003
+ },
1004
+ permalinks: {
1005
+ enabled: false,
1006
+ opened: false,
1007
+ },
1008
+ categories: {
1009
+ enabled: true,
1010
+ opened: false,
1011
+ },
1012
+ excerpt: {
1013
+ enabled: false,
1014
+ opened: true,
1015
+ },
1016
+ discussion: {
1017
+ enabled: false,
1018
+ },
1019
+ template: {
1020
+ opened: true,
1021
+ },
1022
+ },
1023
+ } )
1024
+ ).toEqual( {
1025
+ inactivePanels: [ 'permalinks', 'excerpt', 'discussion' ],
1026
+ openPanels: [ 'tags', 'excerpt', 'template' ],
1027
+ } );
1028
+ } );
1029
+
1030
+ it( 'returns empty arrays when there is no data to convert', () => {
1031
+ expect( convertEditPostPanels( {} ) ).toEqual( {
1032
+ inactivePanels: [],
1033
+ openPanels: [],
1034
+ } );
1035
+ } );
1036
+ } );
1037
+
1038
+ describe( 'migrateInterfaceEnableItemsToPreferencesStore', () => {
1039
+ it( 'migrates enableItems to the preferences store', () => {
1040
+ const persistenceInterface = createPersistenceInterface( {
1041
+ storageKey: 'test-username',
1042
+ } );
1043
+
1044
+ persistenceInterface.set( 'core/interface', {
1045
+ enableItems: {
1046
+ singleEnableItems: {
1047
+ complementaryArea: {
1048
+ 'core/edit-post': 'edit-post/document',
1049
+ 'core/edit-site': 'edit-site/global-styles',
1050
+ },
1051
+ },
1052
+ multipleEnableItems: {
1053
+ pinnedItems: {
1054
+ 'core/edit-post': {
1055
+ 'plugin-1': true,
1056
+ },
1057
+ 'core/edit-site': {
1058
+ 'plugin-2': true,
1059
+ },
1060
+ },
1061
+ },
1062
+ },
1063
+ } );
1064
+
1065
+ migrateInterfaceEnableItemsToPreferencesStore( persistenceInterface );
1066
+
1067
+ expect( persistenceInterface.get() ).toEqual( {
1068
+ 'core/preferences': {
1069
+ preferences: {
1070
+ 'core/edit-post': {
1071
+ complementaryArea: 'edit-post/document',
1072
+ pinnedItems: {
1073
+ 'plugin-1': true,
1074
+ },
1075
+ },
1076
+ 'core/edit-site': {
1077
+ complementaryArea: 'edit-site/global-styles',
1078
+ pinnedItems: {
1079
+ 'plugin-2': true,
1080
+ },
1081
+ },
1082
+ },
1083
+ },
1084
+ 'core/interface': {
1085
+ enableItems: undefined,
1086
+ },
1087
+ } );
1088
+ } );
1089
+
1090
+ it( 'merges pinnedItems and complementaryAreas with existing preferences store data', () => {
1091
+ const persistenceInterface = createPersistenceInterface( {
1092
+ storageKey: 'test-username',
1093
+ } );
1094
+
1095
+ persistenceInterface.set( 'core/interface', {
1096
+ enableItems: {
1097
+ singleEnableItems: {
1098
+ complementaryArea: {
1099
+ 'core/edit-post': 'edit-post/document',
1100
+ 'core/edit-site': 'edit-site/global-styles',
1101
+ },
1102
+ },
1103
+ multipleEnableItems: {
1104
+ pinnedItems: {
1105
+ 'core/edit-post': {
1106
+ 'plugin-1': true,
1107
+ },
1108
+ 'core/edit-site': {
1109
+ 'plugin-2': true,
1110
+ },
1111
+ },
1112
+ },
1113
+ },
1114
+ } );
1115
+
1116
+ persistenceInterface.set( 'core/preferences', {
1117
+ preferences: {
1118
+ 'core/edit-post': {
1119
+ preferenceA: 1,
1120
+ preferenceB: 2,
1121
+ },
1122
+ 'core/edit-site': {
1123
+ preferenceC: true,
1124
+ },
1125
+ },
1126
+ } );
1127
+
1128
+ migrateInterfaceEnableItemsToPreferencesStore( persistenceInterface );
1129
+
1130
+ expect( persistenceInterface.get() ).toEqual( {
1131
+ 'core/preferences': {
1132
+ preferences: {
1133
+ 'core/edit-post': {
1134
+ preferenceA: 1,
1135
+ preferenceB: 2,
1136
+ complementaryArea: 'edit-post/document',
1137
+ pinnedItems: {
1138
+ 'plugin-1': true,
1139
+ },
1140
+ },
1141
+ 'core/edit-site': {
1142
+ preferenceC: true,
1143
+ complementaryArea: 'edit-site/global-styles',
1144
+ pinnedItems: {
1145
+ 'plugin-2': true,
1146
+ },
1147
+ },
1148
+ },
1149
+ },
1150
+ 'core/interface': {
1151
+ enableItems: undefined,
1152
+ },
1153
+ } );
1154
+ } );
1155
+ } );
@@ -321,16 +321,26 @@ function mapActions( actions, store ) {
321
321
  * @return {Object} Selectors mapped to their resolution functions.
322
322
  */
323
323
  function mapResolveSelectors( selectors, store ) {
324
- return mapValues(
325
- omit( selectors, [
326
- 'getIsResolving',
327
- 'hasStartedResolution',
328
- 'hasFinishedResolution',
329
- 'isResolving',
330
- 'getCachedResolvers',
331
- ] ),
332
- ( selector, selectorName ) => ( ...args ) =>
333
- new Promise( ( resolve, reject ) => {
324
+ const storeSelectors = omit( selectors, [
325
+ 'getIsResolving',
326
+ 'hasStartedResolution',
327
+ 'hasFinishedResolution',
328
+ 'hasResolutionFailed',
329
+ 'isResolving',
330
+ 'getCachedResolvers',
331
+ 'getResolutionState',
332
+ 'getResolutionError',
333
+ ] );
334
+
335
+ return mapValues( storeSelectors, ( selector, selectorName ) => {
336
+ // If the selector doesn't have a resolver, just convert the return value
337
+ // (including exceptions) to a Promise, no additional extra behavior is needed.
338
+ if ( ! selector.hasResolver ) {
339
+ return async ( ...args ) => selector.apply( null, args );
340
+ }
341
+
342
+ return ( ...args ) => {
343
+ return new Promise( ( resolve, reject ) => {
334
344
  const hasFinished = () =>
335
345
  selectors.hasFinishedResolution( selectorName, args );
336
346
  const finalize = ( result ) => {
@@ -361,8 +371,9 @@ function mapResolveSelectors( selectors, store ) {
361
371
  finalize( getResult() );
362
372
  }
363
373
  } );
364
- } )
365
- );
374
+ } );
375
+ };
376
+ } );
366
377
  }
367
378
 
368
379
  /**
@@ -4,7 +4,7 @@
4
4
  import { createRegistry } from '../../registry';
5
5
  import { createRegistryControl } from '../../factory';
6
6
 
7
- jest.useFakeTimers();
7
+ jest.useRealTimers();
8
8
 
9
9
  describe( 'controls', () => {
10
10
  let registry;
@@ -90,7 +90,6 @@ describe( 'controls', () => {
90
90
  } );
91
91
 
92
92
  registry.select( 'store' ).getItems();
93
- jest.runAllTimers();
94
93
  } );
95
94
  } );
96
95
  describe( 'selectors have expected value for the `hasResolver` property', () => {
@@ -250,6 +249,7 @@ describe( 'resolveSelect', () => {
250
249
  },
251
250
  selectors: {
252
251
  getItems: () => 'items',
252
+ getItemsNoResolver: () => 'items-no-resolver',
253
253
  },
254
254
  resolvers: {
255
255
  getItems: () => {
@@ -264,16 +264,26 @@ describe( 'resolveSelect', () => {
264
264
  it( 'resolves when the resolution succeeded', async () => {
265
265
  shouldFail = false;
266
266
  const promise = registry.resolveSelect( 'store' ).getItems();
267
- jest.runAllTimers();
268
- await expect( promise ).resolves.toEqual( 'items' );
267
+ await expect( promise ).resolves.toBe( 'items' );
269
268
  } );
270
269
 
271
270
  it( 'rejects when the resolution failed', async () => {
272
271
  shouldFail = true;
273
272
  const promise = registry.resolveSelect( 'store' ).getItems();
274
- jest.runAllTimers();
275
273
  await expect( promise ).rejects.toEqual(
276
274
  new Error( 'cannot fetch items' )
277
275
  );
278
276
  } );
277
+
278
+ it( 'resolves when calling a sync selector without resolver', async () => {
279
+ const promise = registry.resolveSelect( 'store' ).getItemsNoResolver();
280
+ await expect( promise ).resolves.toBe( 'items-no-resolver' );
281
+ } );
282
+
283
+ it( 'returns only store native selectors and excludes all meta ones', () => {
284
+ expect( Object.keys( registry.resolveSelect( 'store' ) ) ).toEqual( [
285
+ 'getItems',
286
+ 'getItemsNoResolver',
287
+ ] );
288
+ } );
279
289
  } );