Skip to content
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
3 changes: 1 addition & 2 deletions src/ui/public/vislib/__tests__/lib/dispatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ let data = require('fixtures/vislib/mock_data/date_histogram/_series');
describe('Vislib Dispatch Class Test Suite', function () {

function destroyVis(vis) {
$(vis.el).remove();
vis = null;
vis.destroy();
}

function getEls(el, n, type) {
Expand Down
3 changes: 1 addition & 2 deletions src/ui/public/vislib/__tests__/lib/handler/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ dateHistogramArray.forEach(function (data, i) {
}));

afterEach(function () {
$(vis.el).remove();
vis = null;
vis.destroy();
});

describe('render Method', function () {
Expand Down
3 changes: 1 addition & 2 deletions src/ui/public/vislib/__tests__/lib/layout/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ dateHistogramArray.forEach(function (data, i) {
});

afterEach(function () {
$(vis.el).remove();
vis = null;
vis.destroy();
});

describe('createLayout Method', function () {
Expand Down
5 changes: 2 additions & 3 deletions src/ui/public/vislib/__tests__/vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ dataArray.forEach(function (data, i) {
}));

afterEach(function () {
$(vis.el).remove();
$(secondVis.el).remove();
vis = null;
vis.destroy();
secondVis.destroy();
});

describe('render Method', function () {
Expand Down
3 changes: 1 addition & 2 deletions src/ui/public/vislib/__tests__/visualizations/area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ _.forOwn(someOtherVariables, function (variablesAreCool, imaVariable) {
}));

afterEach(function () {
$(vis.el).remove();
vis = null;
vis.destroy();
});

describe('checkIfEnoughData method throws an error when not enough data', function () {
Expand Down
1 change: 1 addition & 0 deletions src/ui/public/vislib/__tests__/visualizations/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ describe('Vislib _chart Test Suite', function () {

afterEach(function () {
el.remove();
vis.destroy();
});

it('should be a constructor for visualization modules', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ dataTypesArray.forEach(function (dataType, i) {
}));

afterEach(function () {
$(vis.el).remove();
vis = null;
vis.destroy();
});

describe('stackData method', function () {
Expand Down
3 changes: 1 addition & 2 deletions src/ui/public/vislib/__tests__/visualizations/line_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ describe('Vislib Line Chart', function () {
}));

afterEach(function () {
$(vis.el).remove();
vis = null;
vis.destroy();
});

describe('addCircleEvents method', function () {
Expand Down
7 changes: 3 additions & 4 deletions src/ui/public/vislib/__tests__/visualizations/pie_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ describe('No global chart settings', function () {
}));

afterEach(function () {
chart1 = null;
chart2 = null;
chart1.destroy();
chart2.destroy();
});

it('should render chart titles for all charts', function () {
Expand Down Expand Up @@ -187,8 +187,7 @@ aggArray.forEach(function (dataAgg, i) {
}));

afterEach(function () {
$(vis.el).remove();
vis = null;
vis.destroy();
});

describe('addPathEvents method', function () {
Expand Down