@@ -9,13 +9,14 @@ describe('HybridConfigurationStore', () => {
99 beforeEach ( ( ) => {
1010 syncStoreMock = {
1111 get : jest . fn ( ) ,
12+ entries : jest . fn ( ) ,
1213 getKeys : jest . fn ( ) ,
1314 isInitialized : jest . fn ( ) ,
1415 setEntries : jest . fn ( ) ,
1516 } ;
1617
1718 asyncStoreMock = {
18- getEntries : jest . fn ( ) ,
19+ entries : jest . fn ( ) ,
1920 isInitialized : jest . fn ( ) ,
2021 isExpired : jest . fn ( ) ,
2122 setEntries : jest . fn ( ) ,
@@ -28,7 +29,7 @@ describe('HybridConfigurationStore', () => {
2829 it ( 'should initialize the serving store with entries from the persistent store if the persistent store is initialized' , async ( ) => {
2930 const entries = { key1 : 'value1' , key2 : 'value2' } ;
3031 ( asyncStoreMock . isInitialized as jest . Mock ) . mockReturnValue ( true ) ;
31- ( asyncStoreMock . getEntries as jest . Mock ) . mockResolvedValue ( entries ) ;
32+ ( asyncStoreMock . entries as jest . Mock ) . mockResolvedValue ( entries ) ;
3233
3334 await store . init ( ) ;
3435
@@ -67,6 +68,14 @@ describe('HybridConfigurationStore', () => {
6768 } ) ;
6869 } ) ;
6970
71+ describe ( 'entries' , ( ) => {
72+ it ( 'should return all entries from the serving store' , ( ) => {
73+ const entries = { key1 : 'value1' , key2 : 'value2' } ;
74+ ( syncStoreMock . entries as jest . Mock ) . mockReturnValue ( entries ) ;
75+ expect ( store . entries ( ) ) . toEqual ( entries ) ;
76+ } ) ;
77+ } ) ;
78+
7079 describe ( 'setEntries' , ( ) => {
7180 it ( 'should set entries in both stores if the persistent store is present' , async ( ) => {
7281 const entries = { key1 : 'value1' , key2 : 'value2' } ;
0 commit comments