Skip to content

Commit d4ae5f4

Browse files
committed
fixup
1 parent 34829f3 commit d4ae5f4

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

test/jasmine/tests/cartesian_test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ describe('plot svg clip paths', function() {
9898
// https://github.com/angular/angular.js/issues/8934
9999

100100
// append <base> with href
101-
d3.select('body')
101+
var base = d3.select('body')
102102
.append('base')
103103
.attr('href', 'https://plot.ly');
104104

@@ -117,5 +117,7 @@ describe('plot svg clip paths', function() {
117117
done();
118118
});
119119

120+
base.remove();
121+
120122
});
121123
});

test/jasmine/tests/drawing_test.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ describe('Drawing.setClipUrl', function() {
1111
this.g = this.svg.append('g');
1212
});
1313

14+
afterEach(function() {
15+
this.svg.remove();
16+
this.g.remove();
17+
});
18+
1419
it('should set the clip-path attribute', function() {
1520
expect(this.g.attr('clip-path')).toBe(null);
1621

@@ -30,7 +35,7 @@ describe('Drawing.setClipUrl', function() {
3035
it('should append window URL to clip-path if <base> is present', function() {
3136

3237
// append <base> with href
33-
d3.select('body')
38+
var base = d3.select('body')
3439
.append('base')
3540
.attr('href', 'https://plot.ly');
3641

@@ -41,5 +46,7 @@ describe('Drawing.setClipUrl', function() {
4146

4247
expect(this.g.attr('clip-path'))
4348
.toEqual('url(' + href + '#id3)');
49+
50+
base.remove();
4451
});
4552
});

0 commit comments

Comments
 (0)