Set Basic Auth Header in Jasmine for testing NodeJS Api
<p>I am currently writing a test suite for an API that I am building however I cannot work out how to set the Basic Auth Header to test certain routes. </p>

<p>I can test normal routes like the following:</p>

<pre><code>describe('Get /', function() {
    it('returns statusCode 200', function(done) {
        request.get(base_url, function(error, response){
            expect(response.statusCode).toBe(SuccessCode)
            done()
        })
</code></pre>

<p>However many of mu routes require data from the basic auth header and I cannot work out how to set this. Any help would be greatly appreciated</p>