diff --git a/src/helpers/create_index.js b/src/helpers/create_index.js index acf1b0f..959ab51 100644 --- a/src/helpers/create_index.js +++ b/src/helpers/create_index.js @@ -1,4 +1,4 @@ -var schema = { +const schema = { payload: { type: 'object', enabled: false }, priority: { type: 'short' }, timeout: { type: 'long' }, diff --git a/src/index.js b/src/index.js index 18bf795..76f9b37 100644 --- a/src/index.js +++ b/src/index.js @@ -25,7 +25,7 @@ export default class Esqueue extends events.EventEmitter { } _initTasks() { - var initTasks = [ + const initTasks = [ this.client.ping({ timeout: 3000 }), ]; diff --git a/test/fixtures/elasticsearch.js b/test/fixtures/elasticsearch.js index 620bb00..f32c9ae 100644 --- a/test/fixtures/elasticsearch.js +++ b/test/fixtures/elasticsearch.js @@ -11,7 +11,7 @@ function Client() { } Client.prototype.index = function (params = {}) { - var shardCount = 2; + const shardCount = 2; return Promise.resolve({ _index: params.index || 'index', _type: params.type || 'type', @@ -83,7 +83,7 @@ Client.prototype.search = function (params = {}, count = 5, source = {}) { }; Client.prototype.update = function (params = {}) { - var shardCount = 2; + const shardCount = 2; return Promise.resolve({ _index: params.index || 'index', _type: params.type || 'type', diff --git a/test/src/helpers/index_timestamp.js b/test/src/helpers/index_timestamp.js index 7f1a24b..01c92c4 100644 --- a/test/src/helpers/index_timestamp.js +++ b/test/src/helpers/index_timestamp.js @@ -25,32 +25,32 @@ describe('Index interval', function () { }); it('should return the year', function () { - var timestamp = indexTimestamp('year'); + const timestamp = indexTimestamp('year'); expect(timestamp).to.equal('2016'); }); it('should return the year and month', function () { - var timestamp = indexTimestamp('month'); + const timestamp = indexTimestamp('month'); expect(timestamp).to.equal('2016-04'); }); it('should return the year, month, and first day of the week', function () { - var timestamp = indexTimestamp('week'); + const timestamp = indexTimestamp('week'); expect(timestamp).to.equal('2016-03-27'); }); it('should return the year, month, and day of the week', function () { - var timestamp = indexTimestamp('day'); + const timestamp = indexTimestamp('day'); expect(timestamp).to.equal('2016-04-02'); }); it('should return the year, month, day and hour', function () { - var timestamp = indexTimestamp('hour'); + const timestamp = indexTimestamp('hour'); expect(timestamp).to.equal('2016-04-02-01'); }); it('should return the year, month, day, hour and minute', function () { - var timestamp = indexTimestamp('minute'); + const timestamp = indexTimestamp('minute'); expect(timestamp).to.equal('2016-04-02-01-02'); }); });