mirror of
https://github.com/iconify/collections-json.git
synced 2024-11-08 14:21:00 +00:00
30 lines
992 B
TypeScript
30 lines
992 B
TypeScript
import { lookupCollection, lookupCollections } from '../';
|
|
import type { IconifyMetaDataCollection } from '../';
|
|
|
|
let collections: IconifyMetaDataCollection;
|
|
describe('lookupCollection and lookupCollections', () => {
|
|
beforeAll(() => {
|
|
return lookupCollections().then((c) => {
|
|
collections = c;
|
|
return Promise.resolve(c);
|
|
});
|
|
});
|
|
test('lookupCollections has data', () => {
|
|
expect(collections ? Object.keys(collections).length : 0).toBeGreaterThan(
|
|
0
|
|
);
|
|
});
|
|
test('mdi collection has prefix mdi', async () => {
|
|
const collection = await lookupCollection('mdi');
|
|
expect(collection.prefix).toBe('mdi');
|
|
});
|
|
test('websymbol collection has prefix websymbol', async () => {
|
|
const collection = await lookupCollection('websymbol');
|
|
expect(collection.prefix).toBe('websymbol');
|
|
});
|
|
test('fa collection has prefix fa', async () => {
|
|
const collection = await lookupCollection('fa');
|
|
expect(collection.prefix).toBe('fa');
|
|
});
|
|
});
|