1import { mount, createLocalVue } from '@vue/test-utils';
2import InfoTooltip from '@/components/Global/InfoTooltip';
3
4const localVue = createLocalVue();
5
6describe('InfoTooltip.vue', () => {
7  const wrapper = mount(InfoTooltip, {
8    localVue,
9    propsData: {
10      title: 'A tooltip test title',
11    },
12    mocks: {
13      $t: (key) => key,
14    },
15  });
16  it('should exist', () => {
17    expect(wrapper.exists()).toBe(true);
18  });
19  it('should render title attribute for button', () => {
20    expect(wrapper.attributes('title')).toBe('title');
21  });
22  it('should render icon-tooltip element', () => {
23    expect(wrapper.find('icon-tooltip').exists()).toBe(true);
24  });
25  it('should render correctly', () => {
26    expect(wrapper.element).toMatchSnapshot();
27  });
28});
29