@@ -28,7 +28,7 @@ function makeDeps(
2828 logger : { error : jest . fn ( ) , info : jest . fn ( ) } as unknown as pino . Logger ,
2929 lambdaClient : {
3030 send : jest . fn ( ) ,
31- } as unknown as jest . Mocket < LambdaClient > ,
31+ } as unknown as jest . Mocked < LambdaClient > ,
3232 parameterStoreConfig,
3333 } ;
3434}
@@ -96,7 +96,7 @@ describe("Supplier Mock Lambda", () => {
9696 const deps = makeDeps (
9797 Promise . resolve (
9898 configOutput (
99- '{"limit":"250 ","supplier_id":"SupplierA","specification_id_mapping":{"spec-1":"FAILED"}}' ,
99+ '{"limit":"100 ","supplier_id":"SupplierA","specification_id_mapping":{"spec-1":"FAILED"}}' ,
100100 ) ,
101101 ) ,
102102 ) ;
@@ -139,7 +139,7 @@ describe("Supplier Mock Lambda", () => {
139139 const deps = makeDeps (
140140 Promise . resolve (
141141 configOutput (
142- '{"limit":"250 ","supplier_id":"SupplierA","specification_id_mapping":{"spec-1":""}}' ,
142+ '{"limit":"100 ","supplier_id":"SupplierA","specification_id_mapping":{"spec-1":""}}' ,
143143 ) ,
144144 ) ,
145145 ) ;
@@ -182,7 +182,7 @@ describe("Supplier Mock Lambda", () => {
182182 const deps = makeDeps (
183183 Promise . resolve (
184184 configOutput (
185- '{"limit":"250 ","supplier_id":"SupplierA","specification_id_mapping":{"spec-1":123}}' ,
185+ '{"limit":"100 ","supplier_id":"SupplierA","specification_id_mapping":{"spec-1":123}}' ,
186186 ) ,
187187 ) ,
188188 ) ;
@@ -222,7 +222,13 @@ describe("Supplier Mock Lambda", () => {
222222 } ) ;
223223
224224 it ( "throws when required env var is missing" , async ( ) => {
225- const deps = makeDeps ( ) ;
225+ const deps = makeDeps (
226+ Promise . resolve (
227+ configOutput (
228+ '{"limit":"100","supplier_id":"SupplierA","specification_id_mapping":{"spec-1":123}}' ,
229+ ) ,
230+ ) ,
231+ ) ;
226232 deps . env . GET_LETTERS_FUNCTION_NAME = undefined ;
227233
228234 const handler = createHandler ( deps ) ;
@@ -232,7 +238,13 @@ describe("Supplier Mock Lambda", () => {
232238 } ) ;
233239
234240 it ( "throws when patch letter function env var is missing" , async ( ) => {
235- const deps = makeDeps ( ) ;
241+ const deps = makeDeps (
242+ Promise . resolve (
243+ configOutput (
244+ '{"limit":"100","supplier_id":"SupplierA","specification_id_mapping":{"spec-1":123}}' ,
245+ ) ,
246+ ) ,
247+ ) ;
236248 deps . env . PATCH_LETTER_FUNCTION_NAME = undefined ;
237249
238250 const handler = createHandler ( deps ) ;
@@ -242,7 +254,13 @@ describe("Supplier Mock Lambda", () => {
242254 } ) ;
243255
244256 it ( "throws when config parameter env var is missing" , async ( ) => {
245- const deps = makeDeps ( ) ;
257+ const deps = makeDeps (
258+ Promise . resolve (
259+ configOutput (
260+ '{"limit":"100","supplier_id":"SupplierA","specification_id_mapping":{"spec-1":123}}' ,
261+ ) ,
262+ ) ,
263+ ) ;
246264 deps . env . SUPPLIER_MOCK_CONFIG_PARAM_NAME = undefined ;
247265
248266 const handler = createHandler ( deps ) ;
0 commit comments