/**
* @jest-environment jsdom
*/
import { mount } from '@vue/test-utils';
// Import from file
import { Icon } from '../../dist/offline';
const iconData = {
body: '',
width: 24,
height: 24,
};
describe('Creating component', () => {
test('with wrapper', () => {
const Wrapper = {
components: { Icon },
template: ``,
data() {
return {
icon: iconData,
};
},
};
const wrapper = mount(Wrapper, {});
expect(wrapper.html().replace(/\s*\n\s*/g, '')).toBe(
''
);
});
test('without wrapper', () => {
const wrapper = mount(Icon, {
props: {
icon: iconData,
},
});
expect(wrapper.html().replace(/\s*\n\s*/g, '')).toBe(
''
);
});
});