Skip to content

Commit

Permalink
fix: moving svg mock to correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
phawxby committed May 12, 2018
1 parent 953e564 commit 6ffb148
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/dom-to-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe('dom-to-react parser', function() {


it('handles svg\'s with a viewBox', function() {
var html = mocks.html.svg;
var html = mocks.svg.simple;
var reactElement = domToReact(htmlToDOM(html, { lowerCaseAttributeNames: false }));

assert.deepEqual(
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/mocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"img": "<img src=\"http://stat.ic/img.jpg\" alt=\"Image\"/>",
"void": "<link/><meta/><img/><br/><hr/><input/>",
"comment": "<!-- comment -->",
"doctype": "<!DOCTYPE html>",
"svg": "<svg viewBox=\"0 0 512 512\" id=\"foo\">Inner</svg>"
"doctype": "<!DOCTYPE html>"
},
"svg": {
"simple": "<svg viewBox=\"0 0 512 512\" id=\"foo\">Inner</svg>",
"complex": "<svg height=\"400\" width=\"450\"><path id=\"lineAB\" d=\"M 100 350 l 150 -300\" stroke=\"red\" stroke-width=\"3\" fill=\"none\"></path><g stroke=\"black\" stroke-width=\"3\" fill=\"black\"><circle id=\"pointA\" cx=\"100\" cy=\"350\" r=\"3\"></circle></g><g font-size=\"30\" font-family=\"sans-serif\" fill=\"black\" stroke=\"none\" text-anchor=\"middle\"><text x=\"100\" y=\"350\" dx=\"-30\">A</text></g>Your browser does not support inline SVG.</svg>"
}
}

0 comments on commit 6ffb148

Please sign in to comment.