@@ -199,7 +199,7 @@ Deno.test("FetchClientProvider - setModelValidator validates request data", asyn
199199 mocks . onPost ( "/api/users" ) . reply ( 201 , { id : 1 } ) ;
200200 mocks . install ( provider ) ;
201201
202- provider . setModelValidator ( async ( data ) => {
202+ provider . setModelValidator ( ( data ) => {
203203 const d = data as { email ?: string } ;
204204 if ( ! d ?. email ) {
205205 const problem = new ProblemDetails ( ) ;
@@ -230,12 +230,14 @@ Deno.test("FetchClientProvider - setModelValidator validates request data", asyn
230230
231231Deno . test ( "FetchClientProvider - custom fetch function" , async ( ) => {
232232 let fetchCalled = false ;
233- const customFetch : typeof fetch = async ( input , init ) => {
233+ const customFetch : typeof fetch = ( _input , _init ) => {
234234 fetchCalled = true ;
235- return new Response ( JSON . stringify ( { custom : true } ) , {
236- status : 200 ,
237- headers : { "Content-Type" : "application/json" } ,
238- } ) ;
235+ return Promise . resolve (
236+ new Response ( JSON . stringify ( { custom : true } ) , {
237+ status : 200 ,
238+ headers : { "Content-Type" : "application/json" } ,
239+ } ) ,
240+ ) ;
239241 } ;
240242
241243 const provider = new FetchClientProvider ( customFetch ) ;
@@ -251,12 +253,14 @@ Deno.test("FetchClientProvider - fetch setter works", async () => {
251253 const provider = new FetchClientProvider ( ) ;
252254
253255 let fetchCalled = false ;
254- provider . fetch = async ( ) => {
256+ provider . fetch = ( ) => {
255257 fetchCalled = true ;
256- return new Response ( JSON . stringify ( { updated : true } ) , {
257- status : 200 ,
258- headers : { "Content-Type" : "application/json" } ,
259- } ) ;
258+ return Promise . resolve (
259+ new Response ( JSON . stringify ( { updated : true } ) , {
260+ status : 200 ,
261+ headers : { "Content-Type" : "application/json" } ,
262+ } ) ,
263+ ) ;
260264 } ;
261265
262266 const client = provider . getFetchClient ( ) ;
0 commit comments