mirror of
https://github.com/iconify/iconify.git
synced 2025-02-15 01:41:37 +00:00
Update core package for new redundancy structure
This commit is contained in:
parent
db883f9593
commit
2e838b5ff4
@ -46,7 +46,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
return [item];
|
return [item];
|
||||||
};
|
};
|
||||||
|
|
||||||
const sendQuery = (host, params, item) => {
|
const sendQuery = (host, params, callback) => {
|
||||||
// This callback should be called after prepareQuery
|
// This callback should be called after prepareQuery
|
||||||
expect(asyncCounter).toBe(2);
|
expect(asyncCounter).toBe(2);
|
||||||
asyncCounter++;
|
asyncCounter++;
|
||||||
@ -64,7 +64,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(params).toEqual(expected);
|
expect(params).toEqual(expected);
|
||||||
|
|
||||||
// Send data
|
// Send data
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon1: {
|
icon1: {
|
||||||
@ -170,7 +170,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let queryCounter = 0;
|
let queryCounter = 0;
|
||||||
const sendQuery = (host, params, item) => {
|
const sendQuery = (host, params, callback) => {
|
||||||
// Test input
|
// Test input
|
||||||
expect(host).toBe('https://api1.local');
|
expect(host).toBe('https://api1.local');
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
body: '<path d="" />',
|
body: '<path d="" />',
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons,
|
icons,
|
||||||
// Test mismatched provider: should be ignored because provider name is not affected by actual API response
|
// Test mismatched provider: should be ignored because provider name is not affected by actual API response
|
||||||
@ -263,7 +263,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let queryCounter = 0;
|
let queryCounter = 0;
|
||||||
const sendQuery = (host, params, item) => {
|
const sendQuery = (host, params, callback) => {
|
||||||
queryCounter++;
|
queryCounter++;
|
||||||
params;
|
params;
|
||||||
switch (queryCounter) {
|
switch (queryCounter) {
|
||||||
@ -279,7 +279,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(host).toBe('https://api2.local');
|
expect(host).toBe('https://api2.local');
|
||||||
|
|
||||||
// Return result
|
// Return result
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon1: {
|
icon1: {
|
||||||
@ -359,7 +359,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let queryCounter = 0;
|
let queryCounter = 0;
|
||||||
const sendQuery = (host, params, item) => {
|
const sendQuery = (host, params, callback) => {
|
||||||
queryCounter++;
|
queryCounter++;
|
||||||
|
|
||||||
expect(params.type).toBe('icons');
|
expect(params.type).toBe('icons');
|
||||||
@ -382,7 +382,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(host).toBe('https://api2.local');
|
expect(host).toBe('https://api2.local');
|
||||||
|
|
||||||
// Return result
|
// Return result
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon1: {
|
icon1: {
|
||||||
@ -401,7 +401,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(host).toBe('https://api2.local');
|
expect(host).toBe('https://api2.local');
|
||||||
|
|
||||||
// Return result
|
// Return result
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon3: {
|
icon3: {
|
||||||
@ -514,7 +514,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let queryCounter = 0;
|
let queryCounter = 0;
|
||||||
const sendQuery = (host, params, item) => {
|
const sendQuery = (host, params, callback) => {
|
||||||
queryCounter++;
|
queryCounter++;
|
||||||
|
|
||||||
expect(params.type).toBe('icons');
|
expect(params.type).toBe('icons');
|
||||||
@ -539,7 +539,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(host).toBe('https://api2.local');
|
expect(host).toBe('https://api2.local');
|
||||||
|
|
||||||
// Return result
|
// Return result
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix: params.prefix,
|
prefix: params.prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon1: {
|
icon1: {
|
||||||
@ -559,7 +559,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(host).toBe('https://api2.local');
|
expect(host).toBe('https://api2.local');
|
||||||
|
|
||||||
// Return result
|
// Return result
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix: params.prefix,
|
prefix: params.prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon2: {
|
icon2: {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { PendingQueryItem } from '@iconify/api-redundancy';
|
import type { QueryModuleResponse } from '@iconify/api-redundancy';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Params for sendQuery()
|
* Params for sendQuery()
|
||||||
@ -31,7 +31,7 @@ export type IconifyAPIPrepareIconsQuery = (
|
|||||||
export type IconifyAPISendQuery = (
|
export type IconifyAPISendQuery = (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
status: PendingQueryItem
|
callback: QueryModuleResponse
|
||||||
) => void;
|
) => void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { PendingQueryItem } from '@iconify/api-redundancy';
|
import type { QueryModuleResponse } from '@iconify/api-redundancy';
|
||||||
import type {
|
import type {
|
||||||
IconifyAPIQueryParams,
|
IconifyAPIQueryParams,
|
||||||
IconifyAPIPrepareIconsQuery,
|
IconifyAPIPrepareIconsQuery,
|
||||||
@ -106,6 +106,13 @@ function calculateMaxLength(provider: string, prefix: string): number {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should query be aborted, based on last HTTP status
|
||||||
|
*/
|
||||||
|
function shouldAbort(status: number): boolean {
|
||||||
|
return status === 404;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare params
|
* Prepare params
|
||||||
*/
|
*/
|
||||||
@ -178,11 +185,11 @@ function getPath(provider?: string): string {
|
|||||||
const send: IconifyAPISendQuery = (
|
const send: IconifyAPISendQuery = (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
status: PendingQueryItem
|
callback: QueryModuleResponse
|
||||||
): void => {
|
): void => {
|
||||||
if (!fetchModule) {
|
if (!fetchModule) {
|
||||||
// Fail: return "424 Failed Dependency" (its not meant to be used like that, but it is the closest match)
|
// Fail: return "424 Failed Dependency" (its not meant to be used like that, but it is the closest match)
|
||||||
status.done(void 0, 424);
|
callback('abort', 424);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,7 +215,7 @@ const send: IconifyAPISendQuery = (
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
// Fail: return 400 Bad Request
|
// Fail: return 400 Bad Request
|
||||||
status.done(void 0, 400);
|
callback('abort', 400);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,10 +225,11 @@ const send: IconifyAPISendQuery = (
|
|||||||
// console.log('API query:', host + path);
|
// console.log('API query:', host + path);
|
||||||
fetchModule(host + path)
|
fetchModule(host + path)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.status !== 200) {
|
const status = response.status;
|
||||||
|
if (status !== 200) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// Complete on next tick to get out of try...catch
|
// Complete on next tick to get out of try...catch
|
||||||
status.done(void 0, response.status);
|
callback(shouldAbort(status) ? 'abort' : 'next', status);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -234,7 +242,7 @@ const send: IconifyAPISendQuery = (
|
|||||||
if (typeof data !== 'object' || data === null) {
|
if (typeof data !== 'object' || data === null) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// Complete on next tick to get out of try...catch
|
// Complete on next tick to get out of try...catch
|
||||||
status.done(void 0, defaultError);
|
callback('next', defaultError);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -242,11 +250,11 @@ const send: IconifyAPISendQuery = (
|
|||||||
// Store cache and complete on next tick
|
// Store cache and complete on next tick
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// Complete on next tick to get out of try...catch
|
// Complete on next tick to get out of try...catch
|
||||||
status.done(data);
|
callback('success', data);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
status.done(void 0, defaultError);
|
callback('next', defaultError);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { PendingQueryItem } from '@iconify/api-redundancy';
|
import type { QueryModuleResponse } from '@iconify/api-redundancy';
|
||||||
import type {
|
import type {
|
||||||
IconifyAPIQueryParams,
|
IconifyAPIQueryParams,
|
||||||
IconifyAPIPrepareIconsQuery,
|
IconifyAPIPrepareIconsQuery,
|
||||||
@ -104,6 +104,7 @@ function calculateMaxLength(provider: string, prefix: string): number {
|
|||||||
// Get available length
|
// Get available length
|
||||||
const url = mergeParams(prefix + '.js', {
|
const url = mergeParams(prefix + '.js', {
|
||||||
icons: '',
|
icons: '',
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
callback: rootVarName!,
|
callback: rootVarName!,
|
||||||
});
|
});
|
||||||
result =
|
result =
|
||||||
@ -170,11 +171,11 @@ const prepare: IconifyAPIPrepareIconsQuery = (
|
|||||||
const send: IconifyAPISendQuery = (
|
const send: IconifyAPISendQuery = (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
status: PendingQueryItem
|
callback: QueryModuleResponse
|
||||||
): void => {
|
): void => {
|
||||||
if (params.type !== 'icons') {
|
if (params.type !== 'icons') {
|
||||||
// JSONP supports only icons
|
// JSONP supports only icons
|
||||||
status.done(void 0, 400);
|
callback('abort', 400);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,6 +202,7 @@ const send: IconifyAPISendQuery = (
|
|||||||
|
|
||||||
const url = mergeParams(prefix + '.js', {
|
const url = mergeParams(prefix + '.js', {
|
||||||
icons: iconsList,
|
icons: iconsList,
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
callback: rootVarName!.replace('{cb}', callbackName),
|
callback: rootVarName!.replace('{cb}', callbackName),
|
||||||
});
|
});
|
||||||
const path = pathCache[cacheKey] + url;
|
const path = pathCache[cacheKey] + url;
|
||||||
@ -208,7 +210,7 @@ const send: IconifyAPISendQuery = (
|
|||||||
global[callbackName] = (data: unknown): void => {
|
global[callbackName] = (data: unknown): void => {
|
||||||
// Remove callback and complete query
|
// Remove callback and complete query
|
||||||
delete global[callbackName];
|
delete global[callbackName];
|
||||||
status.done(data);
|
callback('success', data);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create URI
|
// Create URI
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unused-vars-experimental */
|
|
||||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
import type { PendingQueryItem } from '@iconify/api-redundancy';
|
import type { QueryModuleResponse } from '@iconify/api-redundancy';
|
||||||
import type {
|
import type {
|
||||||
IconifyAPIIconsQueryParams,
|
IconifyAPIIconsQueryParams,
|
||||||
IconifyAPIQueryParams,
|
IconifyAPIQueryParams,
|
||||||
@ -252,7 +251,7 @@ export const mockAPIModule: IconifyAPIModule = {
|
|||||||
send: (
|
send: (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
status: PendingQueryItem
|
queryCallback: QueryModuleResponse
|
||||||
) => {
|
) => {
|
||||||
const provider = params.provider;
|
const provider = params.provider;
|
||||||
let data: IconifyMockAPI;
|
let data: IconifyMockAPI;
|
||||||
@ -261,7 +260,7 @@ export const mockAPIModule: IconifyAPIModule = {
|
|||||||
case 'icons': {
|
case 'icons': {
|
||||||
if (provider === void 0) {
|
if (provider === void 0) {
|
||||||
// Fail: return 400 Bad Request
|
// Fail: return 400 Bad Request
|
||||||
status.done(void 0, 400);
|
queryCallback('abort', 400);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const index = (params as MockAPIIconsQueryParams).index;
|
const index = (params as MockAPIIconsQueryParams).index;
|
||||||
@ -280,12 +279,12 @@ export const mockAPIModule: IconifyAPIModule = {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
// Fail: return 400 Bad Request
|
// Fail: return 400 Bad Request
|
||||||
status.done(void 0, 400);
|
queryCallback('abort', 400);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data === void 0) {
|
if (data === void 0) {
|
||||||
status.done(void 0, 404);
|
queryCallback('abort', 404);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,11 +307,10 @@ export const mockAPIModule: IconifyAPIModule = {
|
|||||||
|
|
||||||
// Run after delay
|
// Run after delay
|
||||||
callback(() => {
|
callback(() => {
|
||||||
if (typeof data.response === 'number') {
|
queryCallback(
|
||||||
status.done(void 0, data.response);
|
typeof data.response === 'number' ? 'next' : 'success',
|
||||||
} else {
|
data.response
|
||||||
status.done(data.response);
|
);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { PendingQueryItem } from '@iconify/api-redundancy';
|
import type { QueryModuleResponse } from '@iconify/api-redundancy';
|
||||||
import { addAPIProvider } from '../../lib/api/config';
|
import { addAPIProvider } from '../../lib/api/config';
|
||||||
import type {
|
import type {
|
||||||
IconifyAPIIconsQueryParams,
|
IconifyAPIIconsQueryParams,
|
||||||
@ -58,7 +58,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
const sendQuery = (
|
const sendQuery = (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
item: PendingQueryItem
|
callback: QueryModuleResponse
|
||||||
): void => {
|
): void => {
|
||||||
// This callback should be called after prepareQuery
|
// This callback should be called after prepareQuery
|
||||||
expect(asyncCounter).toBe(2);
|
expect(asyncCounter).toBe(2);
|
||||||
@ -77,7 +77,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(params).toEqual(expected);
|
expect(params).toEqual(expected);
|
||||||
|
|
||||||
// Send data
|
// Send data
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon1: {
|
icon1: {
|
||||||
@ -191,7 +191,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
const sendQuery = (
|
const sendQuery = (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
item: PendingQueryItem
|
callback: QueryModuleResponse
|
||||||
): void => {
|
): void => {
|
||||||
expect(params.type).toBe('icons');
|
expect(params.type).toBe('icons');
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(params).toEqual(expected);
|
expect(params).toEqual(expected);
|
||||||
|
|
||||||
// Send data
|
// Send data
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon1: {
|
icon1: {
|
||||||
@ -265,7 +265,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
const sendQuery = (
|
const sendQuery = (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
item: PendingQueryItem
|
callback: QueryModuleResponse
|
||||||
): void => {
|
): void => {
|
||||||
expect(params.type).toBe('icons');
|
expect(params.type).toBe('icons');
|
||||||
|
|
||||||
@ -280,7 +280,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(params).toEqual(expected);
|
expect(params).toEqual(expected);
|
||||||
|
|
||||||
// Send data
|
// Send data
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon1: {
|
icon1: {
|
||||||
@ -351,7 +351,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
const sendQuery = (
|
const sendQuery = (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
item: PendingQueryItem
|
callback: QueryModuleResponse
|
||||||
): void => {
|
): void => {
|
||||||
// Test input
|
// Test input
|
||||||
expect(host).toBe('https://api1.local');
|
expect(host).toBe('https://api1.local');
|
||||||
@ -378,7 +378,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
body: '<path d="" />',
|
body: '<path d="" />',
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons,
|
icons,
|
||||||
// Test mismatched provider: should be ignored because provider name is not affected by actual API response
|
// Test mismatched provider: should be ignored because provider name is not affected by actual API response
|
||||||
@ -452,7 +452,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
const sendQuery = (
|
const sendQuery = (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
item: PendingQueryItem
|
callback: QueryModuleResponse
|
||||||
): void => {
|
): void => {
|
||||||
queryCounter++;
|
queryCounter++;
|
||||||
params;
|
params;
|
||||||
@ -469,7 +469,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(host).toBe('https://api2.local');
|
expect(host).toBe('https://api2.local');
|
||||||
|
|
||||||
// Return result
|
// Return result
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon1: {
|
icon1: {
|
||||||
@ -556,7 +556,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
const sendQuery = (
|
const sendQuery = (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
item: PendingQueryItem
|
callback: QueryModuleResponse
|
||||||
): void => {
|
): void => {
|
||||||
queryCounter++;
|
queryCounter++;
|
||||||
|
|
||||||
@ -580,7 +580,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(host).toBe('https://api2.local');
|
expect(host).toBe('https://api2.local');
|
||||||
|
|
||||||
// Return result
|
// Return result
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon1: {
|
icon1: {
|
||||||
@ -599,7 +599,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(host).toBe('https://api2.local');
|
expect(host).toBe('https://api2.local');
|
||||||
|
|
||||||
// Return result
|
// Return result
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix,
|
prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon3: {
|
icon3: {
|
||||||
@ -719,7 +719,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
const sendQuery = (
|
const sendQuery = (
|
||||||
host: string,
|
host: string,
|
||||||
params: IconifyAPIQueryParams,
|
params: IconifyAPIQueryParams,
|
||||||
item: PendingQueryItem
|
callback: QueryModuleResponse
|
||||||
): void => {
|
): void => {
|
||||||
queryCounter++;
|
queryCounter++;
|
||||||
|
|
||||||
@ -745,7 +745,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(host).toBe('https://api2.local');
|
expect(host).toBe('https://api2.local');
|
||||||
|
|
||||||
// Return result
|
// Return result
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix: params.prefix,
|
prefix: params.prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon1: {
|
icon1: {
|
||||||
@ -765,7 +765,7 @@ describe('Testing API loadIcons', () => {
|
|||||||
expect(host).toBe('https://api2.local');
|
expect(host).toBe('https://api2.local');
|
||||||
|
|
||||||
// Return result
|
// Return result
|
||||||
item.done({
|
callback('success', {
|
||||||
prefix: params.prefix,
|
prefix: params.prefix,
|
||||||
icons: {
|
icons: {
|
||||||
icon2: {
|
icon2: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user