mirror of
https://github.com/iconify/iconify.git
synced 2025-01-22 14:48:24 +00:00
Add provider to SVG class names list, update unit tests
This commit is contained in:
parent
eb758c4fde
commit
cf3d9394ee
@ -2,14 +2,14 @@ import mocha from 'mocha';
|
|||||||
import chai from 'chai';
|
import chai from 'chai';
|
||||||
import { FakeData, setFakeData, prepareQuery, sendQuery } from './fake-api';
|
import { FakeData, setFakeData, prepareQuery, sendQuery } from './fake-api';
|
||||||
import { API } from '@iconify/core/lib/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 { setAPIConfig } from '@iconify/core/lib/api/config';
|
||||||
import { coreModules } from '@iconify/core/lib/modules';
|
import { coreModules } from '@iconify/core/lib/modules';
|
||||||
|
|
||||||
const expect = chai.expect;
|
const expect = chai.expect;
|
||||||
|
|
||||||
// Set API
|
// Set API
|
||||||
setDefaultAPIModule({
|
setAPIModule('', {
|
||||||
prepare: prepareQuery,
|
prepare: prepareQuery,
|
||||||
send: sendQuery,
|
send: sendQuery,
|
||||||
});
|
});
|
||||||
|
@ -5,7 +5,7 @@ import { getNode } from './node';
|
|||||||
import { addFinder } from '@iconify/iconify/lib/finder';
|
import { addFinder } from '@iconify/iconify/lib/finder';
|
||||||
import { FakeData, setFakeData, prepareQuery, sendQuery } from './fake-api';
|
import { FakeData, setFakeData, prepareQuery, sendQuery } from './fake-api';
|
||||||
import { API } from '@iconify/core/lib/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 { setAPIConfig } from '@iconify/core/lib/api/config';
|
||||||
import { coreModules } from '@iconify/core/lib/modules';
|
import { coreModules } from '@iconify/core/lib/modules';
|
||||||
import { finder as iconifyFinder } from '@iconify/iconify/lib/finders/iconify';
|
import { finder as iconifyFinder } from '@iconify/iconify/lib/finders/iconify';
|
||||||
@ -20,7 +20,7 @@ addFinder(iconifyFinder);
|
|||||||
addFinder(iconifyIconFinder);
|
addFinder(iconifyIconFinder);
|
||||||
|
|
||||||
// Set API
|
// Set API
|
||||||
setDefaultAPIModule({
|
setAPIModule('', {
|
||||||
prepare: prepareQuery,
|
prepare: prepareQuery,
|
||||||
send: sendQuery,
|
send: sendQuery,
|
||||||
});
|
});
|
||||||
|
@ -41,6 +41,7 @@ export function renderIcon(
|
|||||||
const className =
|
const className =
|
||||||
'iconify iconify--' +
|
'iconify iconify--' +
|
||||||
name.prefix +
|
name.prefix +
|
||||||
|
(name.provider === '' ? '' : ' iconify--' + name.provider) +
|
||||||
(filteredClassList.length ? ' ' + filteredClassList.join(' ') : '');
|
(filteredClassList.length ? ' ' + filteredClassList.join(' ') : '');
|
||||||
|
|
||||||
// Generate SVG as string
|
// Generate SVG as string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user