mirror of
https://github.com/iconify/iconify.git
synced 2024-11-10 23:20:59 +00:00
16 lines
409 B
JavaScript
16 lines
409 B
JavaScript
|
import { _api, addAPIProvider } from '../../lib/iconify';
|
||
|
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++;
|