mirror of
https://github.com/iconify/iconify.git
synced 2024-11-14 08:44:05 +00:00
22 lines
678 B
TypeScript
22 lines
678 B
TypeScript
import { FileSystemIconLoader } from '../lib';
|
|
|
|
describe('Testing FileSystemIconLoader', () => {
|
|
test('FileSystemIconLoader', async () => {
|
|
const result = await FileSystemIconLoader(__dirname + '/fixtures')(
|
|
'circle'
|
|
);
|
|
expect(result && result.indexOf('svg') > -1).toBeTruthy();
|
|
});
|
|
|
|
test('FileSystemIconLoader with transform', async () => {
|
|
const result = await FileSystemIconLoader(
|
|
__dirname + '/fixtures',
|
|
(icon) => {
|
|
return icon.replace('<svg ', '<svg width="1em" height="1em" ');
|
|
}
|
|
)('circle');
|
|
expect(result && result.indexOf('width="1em"') > -1).toBeTruthy();
|
|
expect(result && result.indexOf('height="1em"') > -1).toBeTruthy();
|
|
});
|
|
});
|