- flatten auth config to an Authorization header when the Host is created - remove individual Authorization handling from connectors - removed incomplete support for per-request auth - use per-request headers to provide your own Authorization header per request
19 lines
615 B
JavaScript
19 lines
615 B
JavaScript
var expect = require('expect.js');
|
|
var Transport = require('../../../src/lib/transport');
|
|
|
|
describe('jQuery.es namespace', function () {
|
|
it('is defined on the global jQuery', function () {
|
|
expect($.es).to.be.ok();
|
|
});
|
|
|
|
it('has Client, ConnectionPool, Transport, and errors keys', function () {
|
|
expect($.es).to.have.keys('Client', 'ConnectionPool', 'Transport', 'errors');
|
|
});
|
|
|
|
it('can create a client', function () {
|
|
var client = new $.es.Client({ hosts: null });
|
|
expect(client).to.have.keys('transport');
|
|
expect(client.transport).to.be.a($.es.Transport);
|
|
client.close();
|
|
});
|
|
}); |