Skip to content

Build svg text #1783

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

Merged
merged 5 commits into from
Jun 13, 2017
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions test/jasmine/tests/svg_text_utils_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('svg+text utils', function() {
function mockTextSVGElement(txt) {
return d3.select('body')
.append('svg')
.attr('id', 'text')
.classed('text-tester', true)
.append('text')
.text(txt)
.call(util.convertToTspans)
Expand Down Expand Up @@ -74,7 +74,7 @@ describe('svg+text utils', function() {
}

afterEach(function() {
d3.select('#text').remove();
d3.selectAll('.text-tester').remove();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the cases I added (previously and in the next commit) that test several input strings with identical output were not properly cleaned up with just select.

Copy link
Contributor

@etpinard etpinard Jun 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I've seen those forgotten <text> nodes before while npm run test-jasmine. Thanks 🎉

});

it('checks for XSS attack in href', function() {
Expand Down