Skip to content

Commit d8e0ac8

Browse files
committed
Added testcase for camelizing attributes
1 parent b756d3f commit d8e0ac8

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

test/main.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,20 @@ describe('The app', function () {
160160
template: 'all',
161161
type : 'icon'
162162
}));
163-
});
163+
164+
it('should work for all template and camelize dashed element attributes', load('some.svg', function (svg) {
165+
166+
var component = React.createElement(svg, {
167+
type: 'svg'
168+
}),
169+
rendered = TestUtils.renderIntoDocument(component),
170+
path = TestUtils.findRenderedDOMComponentWithTag(rendered, 'path');
171+
172+
(rendered.getDOMNode().tagName.toLowerCase()).should.equal('svg');
173+
(rendered.getDOMNode().querySelector('path').getAttribute('d')).should.equal('M0 0h100v100H0z');
174+
(rendered.getDOMNode().querySelector('path').getAttribute('stroke-width')).should.equal('2.5');
175+
(rendered.getDOMNode().querySelector('path').getAttribute('clip-path')).should.equal('something');
176+
}, {
177+
template: 'all'
178+
}));
179+
});

0 commit comments

Comments
 (0)