title: What range of problems jest.fn() is intended to solve?
body: <p>Maybe I am so badly dumb, but I cannot understand what jest.fn() does precisely and how it is used. I am new to testing and I've got basicly most functionality of jest, but jest.fn() makes me shaking.</p>
  
  <p>I tried to refer to docs, watch tutorials, but all I know at the moment is that jest.fn() can spy on a function or a method.</p>
  
  <p>Why do we need it if we can check the returned value with .toBe or .toEqual, check its existence with .toBeDefined() and its parameters with .toBeCalledWith()?</p>
  
  <p>I'm struggling with it for about a week. I am definetely missing something but I have noone to ask.</p>