2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-06 07:20:40 +00:00

Add provider to SVG class names list, update unit tests

This commit is contained in:
Vjacheslav Trushkin 2020-06-02 00:31:57 +03:00
parent eb758c4fde
commit cf3d9394ee
3 changed files with 5 additions and 4 deletions

View File

@ -2,14 +2,14 @@ import mocha from 'mocha';
import chai from 'chai';
import { FakeData, setFakeData, prepareQuery, sendQuery } from './fake-api';
import { API } from '@iconify/core/lib/api/';
import { setDefaultAPIModule } from '@iconify/core/lib/api/modules';
import { setAPIModule } from '@iconify/core/lib/api/modules';
import { setAPIConfig } from '@iconify/core/lib/api/config';
import { coreModules } from '@iconify/core/lib/modules';
const expect = chai.expect;
// Set API
setDefaultAPIModule({
setAPIModule('', {
prepare: prepareQuery,
send: sendQuery,
});

View File

@ -5,7 +5,7 @@ import { getNode } from './node';
import { addFinder } from '@iconify/iconify/lib/finder';
import { FakeData, setFakeData, prepareQuery, sendQuery } from './fake-api';
import { API } from '@iconify/core/lib/api/';
import { setDefaultAPIModule } from '@iconify/core/lib/api/modules';
import { setAPIModule } from '@iconify/core/lib/api/modules';
import { setAPIConfig } from '@iconify/core/lib/api/config';
import { coreModules } from '@iconify/core/lib/modules';
import { finder as iconifyFinder } from '@iconify/iconify/lib/finders/iconify';
@ -20,7 +20,7 @@ addFinder(iconifyFinder);
addFinder(iconifyIconFinder);
// Set API
setDefaultAPIModule({
setAPIModule('', {
prepare: prepareQuery,
send: sendQuery,
});

View File

@ -41,6 +41,7 @@ export function renderIcon(
const className =
'iconify iconify--' +
name.prefix +
(name.provider === '' ? '' : ' iconify--' + name.provider) +
(filteredClassList.length ? ' ' + filteredClassList.join(' ') : '');
// Generate SVG as string