2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-22 17:58:57 +00:00
iconify/iconify-icon/icon/tests/import-test.mjs
2022-05-12 22:39:56 +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');