[visConfig/tests] test with own element, cleanup after (#14215)

This commit is contained in:
Spencer 2017-10-02 14:41:07 -07:00 committed by GitHub
parent c7d147df89
commit 0a4a2a1219

View file

@ -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();
@ -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');