title: Unit testing NestJS controller with request
body: <p>My Controller function definition looks like that:
  <code>async login(@Req() request, @Body() loginDto: LoginDto): Promise&lt;any&gt; {</code></p>
  
  <p>How I could prepare/mockup Request to provide first argument of function from Jest test? 
  Inside funciton I am setting headers using <code>request.res.set</code>. Should I somehow pass real Request object to function and then check if header is set or rather mockup whole Request object and check if set function was called?</p>