2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-16 17:45:09 +00:00
iconify/components/react/tests/api/load.js

16 lines
412 B
JavaScript
Raw Normal View History

2021-05-01 20:39:56 +00:00
import { _api, addAPIProvider } from '../../dist/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, {
2021-04-28 15:01:30 +00:00
resources: ['http://localhost'],
});
_api.setAPIModule(provider, mockAPIModule);
// Prefix
let counter = 0;
export const nextPrefix = () => 'mock-' + counter++;