title: How to test json inside function using jasmine?
body: <p>This is the code that I want to test:</p>
  
  <pre><code>function loadNotification(searchOption, searchKey) {
     var url = '@URLs.API.Notifications.Past' + '?searchOption=' + searchOption + '&amp;searchValue=' + searchKey;
     $.getJSON(url)
        .done(function (nData) {
          //some code here
        })
        .fail(function (jqXHR, status, error) {
          showError('There was an error while fetching the records. Please try after some time. (' + jqXHR.status + ':' + jqXHR.statusText + ')');
        });
  }
  </code></pre>
  
  <p>Using <em>jasmine</em>, how do I test if the <em>json</em> file fails or not? I was thinking of using <em>.done</em> and <em>.fail</em> but I'm not sure if it's possible. I don't know much about <em>json</em>. Can anyone help me out?</p>