2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-14 22:46:06 +00:00
iconify/iconify-icon/icon/tests/import-test.mjs

26 lines
550 B
JavaScript
Raw Normal View History

// 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');