From 84b4fab85f9817eaf91af74f37de2c6d009264eb Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Mon, 29 Jul 2024 10:23:51 +0300 Subject: [PATCH] chore(utils): test width and height customisations --- packages/utils/tests/iconify-icon-test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/utils/tests/iconify-icon-test.ts b/packages/utils/tests/iconify-icon-test.ts index ac0eb2c..def4e47 100644 --- a/packages/utils/tests/iconify-icon-test.ts +++ b/packages/utils/tests/iconify-icon-test.ts @@ -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,