remove use of var

This commit is contained in:
2016-05-11 10:58:21 -07:00
parent 4793027ff3
commit a4323433f2
4 changed files with 10 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
var schema = { const schema = {
payload: { type: 'object', enabled: false }, payload: { type: 'object', enabled: false },
priority: { type: 'short' }, priority: { type: 'short' },
timeout: { type: 'long' }, timeout: { type: 'long' },

View File

@@ -25,7 +25,7 @@ export default class Esqueue extends events.EventEmitter {
} }
_initTasks() { _initTasks() {
var initTasks = [ const initTasks = [
this.client.ping({ timeout: 3000 }), this.client.ping({ timeout: 3000 }),
]; ];

View File

@@ -11,7 +11,7 @@ function Client() {
} }
Client.prototype.index = function (params = {}) { Client.prototype.index = function (params = {}) {
var shardCount = 2; const shardCount = 2;
return Promise.resolve({ return Promise.resolve({
_index: params.index || 'index', _index: params.index || 'index',
_type: params.type || 'type', _type: params.type || 'type',
@@ -83,7 +83,7 @@ Client.prototype.search = function (params = {}, count = 5, source = {}) {
}; };
Client.prototype.update = function (params = {}) { Client.prototype.update = function (params = {}) {
var shardCount = 2; const shardCount = 2;
return Promise.resolve({ return Promise.resolve({
_index: params.index || 'index', _index: params.index || 'index',
_type: params.type || 'type', _type: params.type || 'type',

View File

@@ -25,32 +25,32 @@ describe('Index interval', function () {
}); });
it('should return the year', function () { it('should return the year', function () {
var timestamp = indexTimestamp('year'); const timestamp = indexTimestamp('year');
expect(timestamp).to.equal('2016'); expect(timestamp).to.equal('2016');
}); });
it('should return the year and month', function () { it('should return the year and month', function () {
var timestamp = indexTimestamp('month'); const timestamp = indexTimestamp('month');
expect(timestamp).to.equal('2016-04'); expect(timestamp).to.equal('2016-04');
}); });
it('should return the year, month, and first day of the week', function () { 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'); expect(timestamp).to.equal('2016-03-27');
}); });
it('should return the year, month, and day of the week', function () { 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'); expect(timestamp).to.equal('2016-04-02');
}); });
it('should return the year, month, day and hour', function () { 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'); expect(timestamp).to.equal('2016-04-02-01');
}); });
it('should return the year, month, day, hour and minute', function () { 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'); expect(timestamp).to.equal('2016-04-02-01-02');
}); });
}); });