Occassionally, your server will be constructed in such a way that you want to
create, listen, and then tear down the server on every request, rather than
starting and stopping your server in before & after each hooks. To accomodate
this use-case, microtest provides the withApp higher order function.
Returns
A function can you call to get the microtest request utility.
Example
constrequest = withApp(myApplication)() constresponse = awaitrequest({ ...args }) // normal args here
Occassionally, your server will be constructed in such a way that you want to create, listen, and then tear down the server on every request, rather than starting and stopping your server in before & after each hooks. To accomodate this use-case,
microtest
provides thewithApp
higher order function.Returns
A function can you call to get the microtest request utility.
Example