2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-06 07:20:40 +00:00

Web component: test changing mode via property

This commit is contained in:
Vjacheslav Trushkin 2022-05-03 10:06:02 +03:00
parent dd85cacfcc
commit 224bd6ad63

View File

@ -277,10 +277,13 @@ describe('Testing icon component', () => {
) as DebugIconifyIconHTMLElement;
expect(node.status).toBe('loading');
// Set mode by changing property
node.mode = 'svg';
expect(node.getAttribute('mode')).toBe('svg');
// Set icon
const body =
'<rect width="10" height="10"><animate attributeName="width" values="10;5;10" dur="10s" repeatCount="indefinite" /></rect>';
node.mode = 'svg';
node.icon = {
body,
};