mirror of
https://github.com/iconify/iconify.git
synced 2025-02-03 04:28:30 +00:00
27 lines
635 B
JavaScript
27 lines
635 B
JavaScript
/**
|
|
* @jest-environment jsdom
|
|
*/
|
|
import { mount } from '@vue/test-utils';
|
|
import { Icon } from '../../';
|
|
import { defaultIconResult } from '../empty';
|
|
|
|
describe('Empty icon', () => {
|
|
test('basic test', () => {
|
|
const wrapper = mount(Icon, {
|
|
propsData: {},
|
|
});
|
|
|
|
expect(wrapper.html().replace(/\s*\n\s*/g, '')).toBe(defaultIconResult);
|
|
});
|
|
|
|
test('with child node (child node is ignored)', () => {
|
|
const Wrapper = {
|
|
components: { Icon },
|
|
template: `<Icon><i class="fa fa-home" /></Icon>`,
|
|
};
|
|
|
|
const wrapper = mount(Wrapper, {});
|
|
expect(wrapper.html().replace(/\s*\n\s*/g, '')).toBe(defaultIconResult);
|
|
});
|
|
});
|