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:
parent
aba9a7b00e
commit
84b4fab85f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user