mirror of
https://github.com/simple-icons/simple-icons.git
synced 2024-12-16 01:10:30 +02:00
a930dc57ec
* convert scripts to esm * fix tests * fix tests * fix lints * syncFs to fsSync * named export for fs Co-authored-by: LitoMore <LitoMore@users.noreply.github.com> * fsSync to { promises as fs } * convert update-svgs-count to esm * rename data to icons * fix build script * switch svglintrc file to mjs * use node: protocol * pluralize getIcons Co-authored-by: LitoMore <LitoMore@users.noreply.github.com>
20 lines
456 B
JavaScript
20 lines
456 B
JavaScript
import { exec } from 'uvu';
|
|
import { testIcon } from './test-icon.js';
|
|
import { getIconSlug, getIconsData } from '../scripts/utils.js';
|
|
(async () => {
|
|
console.warn = () => {};
|
|
|
|
const icons = await getIconsData();
|
|
|
|
const tests = icons.map(async (icon) => {
|
|
const slug = getIconSlug(icon);
|
|
const { default: subject } = await import(`../icons/${slug}.js`);
|
|
|
|
testIcon(icon, subject, slug);
|
|
});
|
|
|
|
await Promise.all(tests);
|
|
|
|
exec();
|
|
})();
|