@@ -9,13 +9,14 @@ describe('HybridConfigurationStore', () => {
9
9
beforeEach ( ( ) => {
10
10
syncStoreMock = {
11
11
get : jest . fn ( ) ,
12
+ entries : jest . fn ( ) ,
12
13
getKeys : jest . fn ( ) ,
13
14
isInitialized : jest . fn ( ) ,
14
15
setEntries : jest . fn ( ) ,
15
16
} ;
16
17
17
18
asyncStoreMock = {
18
- getEntries : jest . fn ( ) ,
19
+ entries : jest . fn ( ) ,
19
20
isInitialized : jest . fn ( ) ,
20
21
isExpired : jest . fn ( ) ,
21
22
setEntries : jest . fn ( ) ,
@@ -28,7 +29,7 @@ describe('HybridConfigurationStore', () => {
28
29
it ( 'should initialize the serving store with entries from the persistent store if the persistent store is initialized' , async ( ) => {
29
30
const entries = { key1 : 'value1' , key2 : 'value2' } ;
30
31
( asyncStoreMock . isInitialized as jest . Mock ) . mockReturnValue ( true ) ;
31
- ( asyncStoreMock . getEntries as jest . Mock ) . mockResolvedValue ( entries ) ;
32
+ ( asyncStoreMock . entries as jest . Mock ) . mockResolvedValue ( entries ) ;
32
33
33
34
await store . init ( ) ;
34
35
@@ -67,6 +68,14 @@ describe('HybridConfigurationStore', () => {
67
68
} ) ;
68
69
} ) ;
69
70
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
+
70
79
describe ( 'setEntries' , ( ) => {
71
80
it ( 'should set entries in both stores if the persistent store is present' , async ( ) => {
72
81
const entries = { key1 : 'value1' , key2 : 'value2' } ;
0 commit comments