Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport] PR #8186 to 5.0 #8432

Merged
merged 1 commit into from
Sep 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/ui/public/vislib/__tests__/components/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ describe('Vislib Color Module Test Suite', function () {
describe('Color (main)', function () {
let previousConfig;
let getColors;
let arr = ['good', 'better', 'best', 'never', 'let', 'it', 'rest'];
let arrayOfNumbers = [1, 2, 3, 4, 5];
let arrayOfUndefinedValues = [undefined, undefined, undefined];
let arrayOfObjects = [{}, {}, {}];
let arrayOfBooleans = [true, false, true];
let arrayOfNullValues = [null, null, null];
let emptyObject = {};
let nullValue = null;
const arr = ['good', 'better', 'best', 'never', 'let', 'it', 'rest'];
const arrayOfNumbers = [1, 2, 3, 4, 5];
const arrayOfUndefinedValues = [undefined, undefined, undefined];
const arrayOfObjects = [{}, {}, {}];
const arrayOfBooleans = [true, false, true];
const arrayOfNullValues = [null, null, null];
const emptyObject = {};
const nullValue = null;
let notAValue;
let color;

Expand Down Expand Up @@ -243,14 +243,14 @@ describe('Vislib Color Module Test Suite', function () {
});

describe('Color Palette', function () {
let num1 = 45;
let num2 = 72;
let num3 = 90;
let string = 'Welcome';
let bool = true;
let nullValue = null;
let emptyArr = [];
let emptyObject = {};
const num1 = 45;
const num2 = 72;
const num3 = 90;
const string = 'Welcome';
const bool = true;
const nullValue = null;
const emptyArr = [];
const emptyObject = {};
let notAValue;
let createColorPalette;
let colorPalette;
Expand Down
54 changes: 27 additions & 27 deletions src/ui/public/vislib/__tests__/components/labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let rowsArr;
let uniqLabels;
let error;

let seriesData = {
const seriesData = {
'label': '',
'series': [
{
Expand All @@ -25,7 +25,7 @@ let seriesData = {
]
};

let rowsData = {
const rowsData = {
'rows': [
{
'label': 'a',
Expand Down Expand Up @@ -66,7 +66,7 @@ let rowsData = {
]
};

let columnsData = {
const columnsData = {
'columns': [
{
'label': 'a',
Expand Down Expand Up @@ -152,23 +152,23 @@ describe('Vislib Labels Module Test Suite', function () {
});

describe('Data array', function () {
let childrenObject = {
const childrenObject = {
children: []
};
let seriesObject = {
const seriesObject = {
series: []
};
let rowsObject = {
const rowsObject = {
rows: []
};
let columnsObject = {
const columnsObject = {
columns: []
};
let string = 'string';
let number = 23;
let boolean = false;
let emptyArray = [];
let nullValue = null;
const string = 'string';
const number = 23;
const boolean = false;
const emptyArray = [];
const nullValue = null;
let notAValue;
let dataArray;
let testSeries;
Expand Down Expand Up @@ -267,7 +267,7 @@ describe('Vislib Labels Module Test Suite', function () {

describe('Unique labels', function () {
let uniqLabels;
let arrObj = [
const arrObj = [
{'label': 'a'},
{'label': 'b'},
{'label': 'b'},
Expand All @@ -276,12 +276,12 @@ describe('Vislib Labels Module Test Suite', function () {
{'label': 'd'},
{'label': 'f'}
];
let string = 'string';
let number = 24;
let boolean = false;
let nullValue = null;
let emptyObject = {};
let emptyArray = [];
const string = 'string';
const number = 24;
const boolean = false;
const nullValue = null;
const emptyObject = {};
const emptyArray = [];
let notAValue;
let uniq;
let testArr;
Expand Down Expand Up @@ -340,18 +340,18 @@ describe('Vislib Labels Module Test Suite', function () {
});

describe('Get series', function () {
let string = 'string';
let number = 24;
let boolean = false;
let nullValue = null;
let rowsObject = {
const string = 'string';
const number = 24;
const boolean = false;
const nullValue = null;
const rowsObject = {
rows: []
};
let columnsObject = {
const columnsObject = {
columns: []
};
let emptyObject = {};
let emptyArray = [];
const emptyObject = {};
const emptyArray = [];
let notAValue;
let getSeries;
let columnsLabels;
Expand Down
38 changes: 19 additions & 19 deletions src/ui/public/vislib/__tests__/components/zero_injection.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import VislibComponentsZeroInjectionZeroFilledArrayProvider from 'ui/vislib/comp
import VislibComponentsZeroInjectionZeroFillDataArrayProvider from 'ui/vislib/components/zero_injection/zero_fill_data_array';

describe('Vislib Zero Injection Module Test Suite', function () {
let dateHistogramRows = {
const dateHistogramRows = {
'rows': [
{
'label': 'Top 5 @tags: success',
Expand Down Expand Up @@ -161,7 +161,7 @@ describe('Vislib Zero Injection Module Test Suite', function () {
]
};

let seriesData = {
const seriesData = {
series: [
{
label: '200',
Expand All @@ -176,7 +176,7 @@ describe('Vislib Zero Injection Module Test Suite', function () {
]
};

let multiSeriesData = {
const multiSeriesData = {
series: [
{
label: '200',
Expand Down Expand Up @@ -205,7 +205,7 @@ describe('Vislib Zero Injection Module Test Suite', function () {
]
};

let multiSeriesNumberedData = {
const multiSeriesNumberedData = {
series: [
{
label: '200',
Expand Down Expand Up @@ -234,24 +234,24 @@ describe('Vislib Zero Injection Module Test Suite', function () {
]
};

let childrenObject = {
const childrenObject = {
children: []
};
let seriesObject = {
const seriesObject = {
series: []
};
let rowsObject = {
const rowsObject = {
rows: []
};
let columnsObject = {
const columnsObject = {
columns: []
};
let emptyObject = {};
let str = 'string';
let number = 24;
let boolean = false;
let nullValue = null;
let emptyArray = [];
const emptyObject = {};
const str = 'string';
const number = 24;
const boolean = false;
const nullValue = null;
const emptyArray = [];
let notAValue;

describe('Zero Injection (main)', function () {
Expand Down Expand Up @@ -497,8 +497,8 @@ describe('Vislib Zero Injection Module Test Suite', function () {

describe('Zero Filled Array', function () {
let createZeroArray;
let arr1 = [1, 2, 3, 4, 5];
let arr2 = ['1', '2', '3', '4', '5'];
const arr1 = [1, 2, 3, 4, 5];
const arr2 = ['1', '2', '3', '4', '5'];
let results1;
let results2;

Expand Down Expand Up @@ -578,10 +578,10 @@ describe('Vislib Zero Injection Module Test Suite', function () {

describe('Zero Filled Data Array', function () {
let zeroFillArray;
let xValueArr = [1, 2, 3, 4, 5];
const xValueArr = [1, 2, 3, 4, 5];
let createZeroArray;
let arr1;
let arr2 = [ {x: 3, y: 834} ];
const arr2 = [ {x: 3, y: 834} ];
let results;

beforeEach(ngMock.module('kibana'));
Expand Down Expand Up @@ -659,7 +659,7 @@ describe('Vislib Zero Injection Module Test Suite', function () {
});

it('should return ordered x values', function () {
let values = results.rows[0].series[0].values;
const values = results.rows[0].series[0].values;
expect(values[0].x).to.be.lessThan(values[1].x);
expect(values[1].x).to.be.lessThan(values[2].x);
expect(values[2].x).to.be.lessThan(values[3].x);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/vislib/__tests__/lib/axis_title.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Vislib AxisTitle Class Test Suite', function () {
let dataObj;
let xTitle;
let yTitle;
let data = {
const data = {
hits: 621,
label: '',
ordered: {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/vislib/__tests__/lib/chart_title.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Vislib ChartTitle Class Test Suite', function () {
let chartTitle;
let el;
let dataObj;
let data = {
const data = {
hits: 621,
label: '',
ordered: {
Expand Down
Loading