use eslint autofix to start fixing violations
This commit is contained in:
28
test/unit/browser_builds/angular.js
vendored
28
test/unit/browser_builds/angular.js
vendored
@ -1,23 +1,23 @@
|
||||
/* global angular */
|
||||
var _ = require('lodash');
|
||||
var expect = require('expect.js');
|
||||
var Promise = require('bluebird');
|
||||
var sinon = require('sinon');
|
||||
const _ = require('lodash');
|
||||
const expect = require('expect.js');
|
||||
const Promise = require('bluebird');
|
||||
const sinon = require('sinon');
|
||||
|
||||
describe('Angular esFactory', function () {
|
||||
before(function () {
|
||||
require('../../../src/elasticsearch.angular.js');
|
||||
});
|
||||
|
||||
var uuid = (function () { var i = 0; return function () { return ++i; }; }());
|
||||
var esFactory;
|
||||
var $http;
|
||||
var $rootScope;
|
||||
var $httpBackend;
|
||||
const uuid = (function () { let i = 0; return function () { return ++i; }; }());
|
||||
let esFactory;
|
||||
let $http;
|
||||
let $rootScope;
|
||||
let $httpBackend;
|
||||
|
||||
function bootstrap(env) {
|
||||
beforeEach(function () {
|
||||
var promiseProvider = _.noop;
|
||||
let promiseProvider = _.noop;
|
||||
if (env.bluebirdPromises) {
|
||||
promiseProvider = function ($provide) {
|
||||
$provide.service('$q', function () {
|
||||
@ -59,7 +59,7 @@ describe('Angular esFactory', function () {
|
||||
});
|
||||
|
||||
it('returns a new client when it is called', function () {
|
||||
var client = esFactory({
|
||||
const client = esFactory({
|
||||
hosts: null
|
||||
});
|
||||
|
||||
@ -69,10 +69,10 @@ describe('Angular esFactory', function () {
|
||||
});
|
||||
|
||||
it('returns an error created by calling a method incorrectly', function () {
|
||||
var client = esFactory({ hosts: null });
|
||||
var err;
|
||||
const client = esFactory({ hosts: null });
|
||||
let err;
|
||||
|
||||
var prom = client.get().then(function () {
|
||||
const prom = client.get().then(function () {
|
||||
throw new Error('expected request to fail');
|
||||
}, function (err) {
|
||||
expect(err).to.have.property('message');
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
var expect = require('expect.js');
|
||||
var Transport = require('../../../src/lib/transport');
|
||||
const expect = require('expect.js');
|
||||
const Transport = require('../../../src/lib/transport');
|
||||
|
||||
describe('elasticsearch namespace', function () {
|
||||
var es = window.elasticsearch;
|
||||
const es = window.elasticsearch;
|
||||
it('is defined on the window', function () {
|
||||
expect(es).to.be.ok();
|
||||
});
|
||||
@ -12,7 +12,7 @@ describe('elasticsearch namespace', function () {
|
||||
});
|
||||
|
||||
it('can create a client', function () {
|
||||
var client = new es.Client({ hosts: null });
|
||||
const client = new es.Client({ hosts: null });
|
||||
expect(client).to.have.keys('transport');
|
||||
expect(client.transport).to.be.a(es.Transport);
|
||||
client.close();
|
||||
|
||||
6
test/unit/browser_builds/jquery.js
vendored
6
test/unit/browser_builds/jquery.js
vendored
@ -1,6 +1,6 @@
|
||||
/* global $ */
|
||||
var expect = require('expect.js');
|
||||
var Transport = require('../../../src/lib/transport');
|
||||
const expect = require('expect.js');
|
||||
const Transport = require('../../../src/lib/transport');
|
||||
|
||||
describe('jQuery.es namespace', function () {
|
||||
it('is defined on the global jQuery', function () {
|
||||
@ -12,7 +12,7 @@ describe('jQuery.es namespace', function () {
|
||||
});
|
||||
|
||||
it('can create a client', function () {
|
||||
var client = new $.es.Client({ hosts: null });
|
||||
const client = new $.es.Client({ hosts: null });
|
||||
expect(client).to.have.keys('transport');
|
||||
expect(client.transport).to.be.a($.es.Transport);
|
||||
client.close();
|
||||
|
||||
Reference in New Issue
Block a user