2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-12 13:47:49 +00:00

chore(utils): test width and height customisations

This commit is contained in:
Vjacheslav Trushkin 2024-07-29 10:23:51 +03:00
parent aba9a7b00e
commit 84b4fab85f

View File

@ -100,6 +100,21 @@ describe('Testing loadIcon with @iconify-json/flat-color-icons>', () => {
expect(result && result.includes('height="1em"')).toBeTruthy();
});
test('loadIcon with custom width/height', async () => {
const result = await loadNodeIcon('flat-color-icons', 'up-right', {
customizations: {
customize(props) {
props.width = '2em';
props.height = '1em';
return props;
},
},
});
expect(result).toBeTruthy();
expect(result && result.includes('width="2em"')).toBeTruthy();
expect(result && result.includes('height="1em"')).toBeTruthy();
});
test('loadIcon with 0 scale', async () => {
const result = await loadNodeIcon('flat-color-icons', 'up-right', {
scale: 0,