2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-13 22:18:24 +00:00
iconify/components/vue2/tests/api/load.js
2022-05-12 22:39:56 +03:00

16 lines
416 B
JavaScript

import { _api, addAPIProvider } from '../../dist/iconify';
import { mockAPIModule } from '@iconify/core/lib/api/modules/mock.cjs';
// 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++;