2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-14 06:28:24 +00:00
iconify/packages/vue/tests/api/load.js
2021-09-27 16:58:47 +03:00

16 lines
400 B
JavaScript

import { _api, addAPIProvider } from '../../';
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++;