import mocha from 'mocha'; import chai from 'chai'; import { getNode } from './node'; import Iconify from '@iconify/iconify/lib/iconify'; const expect = chai.expect; const selector = 'span.iconify, i.iconify, span.iconify-inline, i.iconify-inline'; const node = getNode('iconify-api'); Iconify.setRoot(node); node.innerHTML = '

Testing Iconify with API

'; describe('Testing Iconify object', () => { it('Rendering icons with API', () => { // Icons should have been replaced by now let list = node.querySelectorAll(selector); expect(list.length).to.be.equal(0); list = node.querySelectorAll('svg.iconify'); expect(list.length).to.be.equal(4); }); });