Skip to content

Commit c3f19b7

Browse files
committed
updated test to include colon and hyphens
1 parent ffb47bb commit c3f19b7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/parse-tag.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,22 @@ test('parseTag', function (t) {
5353
children: []
5454
});
5555

56+
tag = '<svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" data-id="175">'
57+
58+
t.deepEqual(parseTag(tag), {
59+
type: 'tag',
60+
name: 'svg',
61+
attrs: {
62+
'aria-hidden': 'true',
63+
'data-id': '175',
64+
style: 'position: absolute; width: 0; height: 0; overflow: hidden;',
65+
version: '1.1',
66+
xmlns: 'http://www.w3.org/2000/svg',
67+
'xmlns:xlink': 'http://www.w3.org/1999/xlink'
68+
},
69+
voidElement: false,
70+
children: []
71+
}, 'should parse tags containing attributes with hyphens and/or colons');
72+
5673
t.end();
5774
});

0 commit comments

Comments
 (0)