2
0
mirror of https://github.com/iconify/iconify.git synced 2024-09-20 01:09:04 +00:00
iconify/packages/utils/tests/get-icon-test.ts
2022-07-01 23:09:53 +03:00

44 lines
645 B
TypeScript

import { getIconData } from '../lib/icon-set/get-icon';
describe('Testing getting icon data', () => {
test('Simple icon', () => {
const result = getIconData(
{
prefix: 'foo',
icons: {
bar: {
body: '<g />',
width: 24,
},
},
},
'bar'
);
expect(result).toEqual({
body: '<g />',
width: 24,
});
});
test('Minified icon set', () => {
const result = getIconData(
{
prefix: 'foo',
icons: {
bar: {
body: '<g />',
},
},
width: 24,
height: 24,
},
'bar'
);
expect(result).toEqual({
body: '<g />',
width: 24,
height: 24,
});
});
});