Remove "class-name" from svg icon (#33540)
Only use "class" attribute (cherry picked from commit 06088ec672a053b11a20ca6dd21588380d67f396)
This commit is contained in:
parent
d81baf21e9
commit
0ff2c11432
5 changed files with 20 additions and 30 deletions
|
@ -16,12 +16,11 @@ test('svgParseOuterInner', () => {
|
|||
|
||||
test('SvgIcon', () => {
|
||||
const root = document.createElement('div');
|
||||
createApp({render: () => h(SvgIcon, {name: 'octicon-link', size: 24, class: 'base', className: 'extra'})}).mount(root);
|
||||
createApp({render: () => h(SvgIcon, {name: 'octicon-link', size: 24, class: 'base'})}).mount(root);
|
||||
const node = root.firstChild;
|
||||
expect(node.nodeName).toEqual('svg');
|
||||
expect(node.getAttribute('width')).toEqual('24');
|
||||
expect(node.getAttribute('height')).toEqual('24');
|
||||
expect(node.classList.contains('octicon-link')).toBeTruthy();
|
||||
expect(node.classList.contains('base')).toBeTruthy();
|
||||
expect(node.classList.contains('extra')).toBeTruthy();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue