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.
I can test normal routes like the following:
describe('Get /', function() {
it('returns statusCode 200', function(done) {
request.get(base_url, function(error, response){
expect(response.statusCode).toBe(SuccessCode)
done()
})
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