UNPKG

lore-ui

Version:

Package used to perform Lore stylization.

40 lines 1.89 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const __1 = require("../"); const colors_1 = require("../../colors"); const utils_1 = require("../../utils"); describe('Icon tests', () => { const { gray, white } = colors_1.colors; let duplicateKeys; beforeAll(() => { const { duplicateKeyValues } = (0, utils_1.checkDuplicateKeysAndHexadecimals)(__1.iconBase); duplicateKeys = duplicateKeyValues; }); test('Should check for duplicate icon or ton keys', async () => { if (duplicateKeys.length > 0) { throw new Error(`Duplicated keys values found:\n${duplicateKeys.join('\n')}`); } expect(duplicateKeys.length).toBe(0); }); // test('Should generate an error if the icon does not have a declared color', async () => { // const expected = 'Color not found' // const received = houseOutlined // expect(received).toBe(expected) // }) test('Should check if the icon returns with colors without the tone', async () => { const expected = await (0, utils_1.toBase64)(__1.iconBase.houseOutlined(white)); const received = await __1.icons.houseOutlined.white; expect(received).toBe(expected); }); test('Should check if the icon returns declaring the empty color tone', async () => { const expected = await (0, utils_1.toBase64)(__1.iconBase.houseOutlined(gray[''])); const received = await __1.icons.houseOutlined.gray['']; expect(received).toBe(expected); }); test('Should check if the icon returns with declaring the color tone', async () => { const expected = await (0, utils_1.toBase64)(__1.iconBase.houseOutlined(gray[900])); const received = await __1.icons.houseOutlined.gray[900]; expect(received).toBe(expected); }); }); //# sourceMappingURL=icon.test.js.map