2
0
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:
Joaquín Sánchez Jiménez 2022-03-17 13:14:35 +01:00
parent 78c099669b
commit 248b1f9d39
2 changed files with 6 additions and 6 deletions

View File

@ -109,7 +109,6 @@ export async function mergeIconProps(
}
return acc;
}, {} as Record<string, string>);
console.log(options.usedProps);
}
return svg;

View File

@ -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 () => {