2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-13 14:13:06 +00:00
iconify/components/vue/tests/api/load.ts

16 lines
413 B
TypeScript
Raw Normal View History

import { _api, addAPIProvider } from '../../';
2021-05-06 08:21:39 +00:00
import { mockAPIModule } from '@iconify/core/lib/api/modules/mock';
// API provider for tests
export const provider = 'mock-api';
// Set API module for provider
addAPIProvider(provider, {
resources: ['http://localhost'],
});
_api.setAPIModule(provider, mockAPIModule);
// Prefix
let counter = 0;
export const nextPrefix = () => 'mock-' + (counter++).toString();