mirror of
https://github.com/iconify/iconify.git
synced 2024-11-09 23:00:56 +00:00
chore: cleanup + fix ts problem on tests
This commit is contained in:
parent
78c099669b
commit
248b1f9d39
@ -109,7 +109,6 @@ export async function mergeIconProps(
|
||||
}
|
||||
return acc;
|
||||
}, {} as Record<string, string>);
|
||||
console.log(options.usedProps);
|
||||
}
|
||||
|
||||
return svg;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { promises as fs } from 'fs';
|
||||
import { getCustomIcon } from '../lib';
|
||||
import { IconifyLoaderOptions } from '../src';
|
||||
import type { IconifyLoaderOptions } from '../src';
|
||||
|
||||
const fixturesDir = './tests/fixtures';
|
||||
|
||||
@ -32,10 +32,11 @@ describe('Testing getCustomIcon', () => {
|
||||
const result = await getCustomIcon(() => svg, 'a', 'b', options);
|
||||
expect(result && result.indexOf('width="1em"') > -1).toBeTruthy();
|
||||
expect(result && result.indexOf('height="1em"') > -1).toBeTruthy();
|
||||
expect(options.usedProps).toHaveProperty('width');
|
||||
expect(options.usedProps).toHaveProperty('height');
|
||||
expect(options.usedProps.width).toEqual('4em');
|
||||
expect(options.usedProps.height).toEqual('4em');
|
||||
expect(options.usedProps).toBeTruthy();
|
||||
expect(options.usedProps!).toHaveProperty('width');
|
||||
expect(options.usedProps!).toHaveProperty('height');
|
||||
expect(options.usedProps!.width).toEqual('4em');
|
||||
expect(options.usedProps!.height).toEqual('4em');
|
||||
});
|
||||
|
||||
test('Icon with XML heading', async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user