export function fakeFetchResponseSuccess ( data ) { return { ok : true , json : ( ) => Promise . resolve ( data ) } as Response ; } export function fakeFetchResponseError ( statusText ) { return { ok : false , statusText } as Response ; }