Skip to content

Commit 6ffb148

Browse files
committed
fix: moving svg mock to correct place
1 parent 953e564 commit 6ffb148

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/dom-to-react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ describe('dom-to-react parser', function() {
130130

131131

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

136136
assert.deepEqual(

test/helpers/mocks.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"img": "<img src=\"http://stat.ic/img.jpg\" alt=\"Image\"/>",
1212
"void": "<link/><meta/><img/><br/><hr/><input/>",
1313
"comment": "<!-- comment -->",
14-
"doctype": "<!DOCTYPE html>",
15-
"svg": "<svg viewBox=\"0 0 512 512\" id=\"foo\">Inner</svg>"
14+
"doctype": "<!DOCTYPE html>"
1615
},
1716
"svg": {
17+
"simple": "<svg viewBox=\"0 0 512 512\" id=\"foo\">Inner</svg>",
1818
"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>"
1919
}
2020
}

0 commit comments

Comments
 (0)