move constants to lib root

This commit is contained in:
2016-07-11 11:20:44 -07:00
parent 27390fef44
commit c6986e3677
12 changed files with 32 additions and 30 deletions

View File

@@ -2,7 +2,7 @@ import expect from 'expect.js';
import sinon from 'sinon';
import createIndex from '../../../lib/helpers/create_index';
import elasticsearchMock from '../../fixtures/elasticsearch';
import { defaultSettings } from '../../../lib/helpers/constants';
import { DEFAULT_SETTING_DOCTYPE } from '../../../lib/constants';
describe('Create Index', function () {
@@ -36,7 +36,7 @@ describe('Create Index', function () {
it('should create the type mappings', function () {
const indexName = 'test-index';
const docType = defaultSettings.DEFAULT_SETTING_DOCTYPE;
const docType = DEFAULT_SETTING_DOCTYPE;
const result = createIndex(client, indexName);
return result

View File

@@ -3,7 +3,7 @@ import expect from 'expect.js';
import sinon from 'sinon';
import proxyquire from 'proxyquire';
import elasticsearchMock from '../fixtures/elasticsearch';
import contstants from '../../lib/helpers/constants';
import contstants from '../../lib/constants';
const createIndexMock = sinon.stub().returns(Promise.resolve('mock'));
const module = proxyquire.noPreserveCache()('../../lib/job', {

View File

@@ -5,7 +5,7 @@ import { noop, random, get, find } from 'lodash';
import elasticsearchMock from '../fixtures/elasticsearch';
import QueueMock from '../fixtures/queue';
import Worker from '../../lib/worker';
import constants from '../../lib/helpers/constants';
import constants from '../../lib/constants';
const anchor = '2016-04-02T01:02:03.456'; // saturday
const defaults = {