mirror of
https://github.com/iconify/iconify.git
synced 2025-01-08 15:54:09 +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;
|
return acc;
|
||||||
}, {} as Record<string, string>);
|
}, {} as Record<string, string>);
|
||||||
console.log(options.usedProps);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return svg;
|
return svg;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import { getCustomIcon } from '../lib';
|
import { getCustomIcon } from '../lib';
|
||||||
import { IconifyLoaderOptions } from '../src';
|
import type { IconifyLoaderOptions } from '../src';
|
||||||
|
|
||||||
const fixturesDir = './tests/fixtures';
|
const fixturesDir = './tests/fixtures';
|
||||||
|
|
||||||
@ -32,10 +32,11 @@ describe('Testing getCustomIcon', () => {
|
|||||||
const result = await getCustomIcon(() => svg, 'a', 'b', options);
|
const result = await getCustomIcon(() => svg, 'a', 'b', options);
|
||||||
expect(result && result.indexOf('width="1em"') > -1).toBeTruthy();
|
expect(result && result.indexOf('width="1em"') > -1).toBeTruthy();
|
||||||
expect(result && result.indexOf('height="1em"') > -1).toBeTruthy();
|
expect(result && result.indexOf('height="1em"') > -1).toBeTruthy();
|
||||||
expect(options.usedProps).toHaveProperty('width');
|
expect(options.usedProps).toBeTruthy();
|
||||||
expect(options.usedProps).toHaveProperty('height');
|
expect(options.usedProps!).toHaveProperty('width');
|
||||||
expect(options.usedProps.width).toEqual('4em');
|
expect(options.usedProps!).toHaveProperty('height');
|
||||||
expect(options.usedProps.height).toEqual('4em');
|
expect(options.usedProps!.width).toEqual('4em');
|
||||||
|
expect(options.usedProps!.height).toEqual('4em');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Icon with XML heading', async () => {
|
test('Icon with XML heading', async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user