writing unit test for JSON request and response
<pre><code>var JsonClient = createing HTTP Request
JsonClient.open("POST", url, true);

JsonClient.send(data);

JsonClient.onload = function () {

};

JsonClient.onerror = function (e) {

};
</code></pre>

<p>How would i a write a unit test for a request and response. </p>

<pre><code>it('should fail with other error messages', function() {
   expect(sampleapp.myMethod()).toBe('the result');
   expect(new Date()).toBe('another date');
});
</code></pre>

<p><a href="http://pivotal.github.com/jasmine/" rel="nofollow">http://pivotal.github.com/jasmine/</a></p>
