Skip to content

Commit

Permalink
[visConfig/tests] test with own element, cleanup after (#14215)
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger authored Oct 2, 2017
1 parent c7d147d commit 0a4a2a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ui/public/vislib/__tests__/lib/vis_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('Vislib VisConfig Class Test Suite', function () {
beforeEach(ngMock.inject(function (Private, $injector) {
const VisConfig = Private(VislibVisConfigProvider);
const PersistedState = $injector.get('PersistedState');
el = d3.select('body')
el = d3.select('body').append('div')
.attr('class', 'vis-wrapper')
.node();

Expand All @@ -79,6 +79,10 @@ describe('Vislib VisConfig Class Test Suite', function () {
}, data, new PersistedState(), el);
}));

afterEach(() => {
el.remove();
});

describe('get Method', function () {
it('should be a function', function () {
expect(typeof visConfig.get).to.be('function');
Expand Down

0 comments on commit 0a4a2a1

Please sign in to comment.