mirror of
https://github.com/iconify/iconify.git
synced 2025-01-07 15:44:05 +00:00
Do not use non-null assertion in test in utils
This commit is contained in:
parent
a7899d812f
commit
ad18afe316
@ -43,11 +43,14 @@ 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).toBeTruthy();
|
expect(options.usedProps).toBeTruthy();
|
||||||
expect(options.usedProps!).toHaveProperty('width');
|
|
||||||
expect(options.usedProps!).toHaveProperty('height');
|
const usedProps = options.usedProps as Record<string, string>;
|
||||||
expect(options.usedProps!.width).toEqual('4em');
|
expect(usedProps).toHaveProperty('width');
|
||||||
expect(options.usedProps!.height).toEqual('4em');
|
expect(usedProps).toHaveProperty('height');
|
||||||
|
expect(usedProps.width).toEqual('4em');
|
||||||
|
expect(usedProps.height).toEqual('4em');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Icon with XML heading', async () => {
|
test('Icon with XML heading', async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user