2
0
mirror of https://github.com/iconify/iconify.git synced 2024-09-21 09:39:11 +00:00
iconify/packages/icon/tests/import-test.mjs
2022-05-01 10:59:23 +03:00

26 lines
550 B
JavaScript

// Main file
import { addIcon } from 'iconify-icon';
// Named import from .mjs
import { loadIcons } from '../dist/iconify-icon.mjs';
/**
* Simple assertion function
*/
function test(value, expected, message) {
if (value !== expected) {
console.error(
'❌',
message + `: expected ${value} to equal ${expected}`
);
process.exit(1);
}
console.log('✓', message);
}
/**
* Test named exports
*/
test(typeof addIcon, 'function', 'Testing addIcon named export');
test(typeof loadIcons, 'function', 'Testing loadIcons named export');