Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Dec 30, 2016
1 parent 8fdde7d commit a561e96
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,22 @@ describe('Transport', function () {
});
});
}

describe('options', function () {
it('should accept an `extraHeaders` option for XMLHttpRequest in browser', function () {
var headers = {
'X-Custom-Header-For-My-Project': 'my-secret-access-token',
'Cookie': 'user_session=NI2JlCKF90aE0sJZD9ZzujtdsUqNYSBYxzlTsvdSUe35ZzdtVRGqYFr0kdGxbfc5gUOkR9RGp20GVKza; path=/; expires=Tue, 07-Apr-2015 18:18:08 GMT; secure; HttpOnly'
};
var socket = new eio.Socket({
transportOptions: {
polling: {
extraHeaders: headers
}
}
});
expect(socket.transport.name).to.be('polling');
expect(socket.transport.extraHeaders).to.equal(headers);
});
});
});

0 comments on commit a561e96

Please sign in to comment.