change test structure, create elasticsearch fixture
This commit is contained in:
6
test/fixtures/elasticsearch.js
vendored
Normal file
6
test/fixtures/elasticsearch.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
function Client() {}
|
||||
Client.prototype.index = function () {};
|
||||
|
||||
export default {
|
||||
Client: Client
|
||||
};
|
||||
@@ -1,11 +1,8 @@
|
||||
import expect from 'expect.js';
|
||||
import proxyquire from 'proxyquire';
|
||||
import * as elasticsearchMock from '../../fixtures/elasticsearch';
|
||||
|
||||
const elasticsearchMock = {
|
||||
Client: function Client() {}
|
||||
};
|
||||
|
||||
const createClient = proxyquire.noPreserveCache()('../../lib/helpers/create_client', {
|
||||
const createClient = proxyquire.noPreserveCache()('../../../lib/helpers/create_client', {
|
||||
elasticsearch: elasticsearchMock
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Elastique from '../lib/index';
|
||||
import Elastique from '../../lib/index';
|
||||
import expect from 'expect.js';
|
||||
|
||||
describe('Elastique class', function () {
|
||||
@@ -24,4 +24,9 @@ describe('Elastique class', function () {
|
||||
expect(init).to.throwException(/invalid.+protocol/i);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Job Creation', function () {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user