xref: /openbmc/webui-vue/tests/unit/Global/InfoTooltip.spec.js (revision e88b816d47ce36ebc449b3ad78496916beda8ca4)
1import { mount, createLocalVue } from '@vue/test-utils';
2import InfoTooltip from '@/components/Global/InfoTooltip';
3import { BootstrapVue } from 'bootstrap-vue';
4
5const localVue = createLocalVue();
6localVue.use(BootstrapVue);
7
8describe('InfoTooltip.vue', () => {
9  const wrapper = mount(InfoTooltip, {
10    localVue,
11    propsData: {
12      title: 'A tooltip test title',
13    },
14    mocks: {
15      $t: (key) => key,
16    },
17  });
18  it('should exist', () => {
19    expect(wrapper.exists()).toBe(true);
20  });
21  it('should render correctly', () => {
22    expect(wrapper.element).toMatchSnapshot();
23  });
24});
25