title: JEST - why mock api calls?
body: <p>I'm getting familiar with JavaScript testing, and may be missing a point or two related to mocking api calls. Every tutorial I have found mocks api calls when doing unit or integration testing - example: <a href="https://jestjs.io/docs/en/tutorial-async" rel="noreferrer">https://jestjs.io/docs/en/tutorial-async</a></p>
  
  <p>I dont understand the value of mocking a server response by providing hard coded data, and then testing the value of that hard coded data. It seems like all such a test does is tell you whether or not your tool used a mock instead of an actual api call. That result doesn't tell you anything about the behavior of your application though does it not? Am I missing something?</p>
  
  <p>Additionally, what if I wanted to actually test the result of a real api call? Does that push me over into functional testing territory? Could a real test of an api call be done with a tool like Jest, or is that better suited for something like selenium or testcafe?</p>