@@ -55,6 +55,7 @@ describe('builder', () => {
55
55
. then ( ( ) => api . user . getUsers ( ) )
56
56
. then ( expectOnlyOneApiCall ) ;
57
57
} ) ;
58
+
58
59
it ( 'Two read api calls will return the same output' , ( done ) => {
59
60
const myConfig = config ( ) ;
60
61
myConfig . user . api . getUsers = sinon . spy ( myConfig . user . api . getUsers ) ;
@@ -70,6 +71,7 @@ describe('builder', () => {
70
71
. then ( ( ) => api . user . getUsers ( ) )
71
72
. then ( expectOnlyOneApiCall ) ;
72
73
} ) ;
74
+
73
75
it ( '1000 calls is not slow' , ( done ) => {
74
76
const myConfig = config ( ) ;
75
77
myConfig . user . api . getUsers = sinon . spy ( myConfig . user . api . getUsers ) ;
@@ -87,6 +89,7 @@ describe('builder', () => {
87
89
}
88
90
bc . then ( checkTimeConstraint ) ;
89
91
} ) ;
92
+
90
93
it ( 'Works with non default id set' , ( done ) => {
91
94
const myConfig = config ( ) ;
92
95
myConfig . __config = { idField : 'mySecretId' , useProductionBuild : true } ;
@@ -106,6 +109,7 @@ describe('builder', () => {
106
109
. then ( ( ) => api . user . getUsers ( ) )
107
110
. then ( expectOnlyOneApiCall ) ;
108
111
} ) ;
112
+
109
113
it ( 'Delete removes value from cached array' , ( done ) => {
110
114
const myConfig = config ( ) ;
111
115
myConfig . user . api . getUsers = sinon . spy ( ( ) => Promise . resolve ( [ { id : 1 } , { id : 2 } ] ) ) ;
@@ -122,6 +126,7 @@ describe('builder', () => {
122
126
. then ( ( ) => api . user . getUsers ( ) )
123
127
. then ( expectUserToBeRemoved ) ;
124
128
} ) ;
129
+
125
130
it ( 'TTL set to zero means we never get a cache hit' , ( done ) => {
126
131
const myConfig = config ( ) ;
127
132
myConfig . user . ttl = 0 ;
0 commit comments