xref: /openbmc/webui-vue/tests/unit/Global/InfoTooltip.spec.js (revision 7d6b44cb263da09e575c7cb28cab88c1eb339c7b)
1*7d6b44cbSEd Tanousimport { mount } from '@vue/test-utils';
26b426787SSurenNewareimport InfoTooltip from '@/components/Global/InfoTooltip';
36b426787SSurenNeware
47def3249SDerick Montagueprocess.env.BOOTSTRAP_VUE_NO_WARN = true;
56b426787SSurenNeware
66b426787SSurenNewaredescribe('InfoTooltip.vue', () => {
76b426787SSurenNeware  const wrapper = mount(InfoTooltip, {
86b426787SSurenNeware    propsData: {
96b426787SSurenNeware      title: 'A tooltip test title',
106b426787SSurenNeware    },
116b426787SSurenNeware    mocks: {
126b426787SSurenNeware      $t: (key) => key,
136b426787SSurenNeware    },
146b426787SSurenNeware  });
156b426787SSurenNeware  it('should exist', () => {
166b426787SSurenNeware    expect(wrapper.exists()).toBe(true);
176b426787SSurenNeware  });
186b426787SSurenNeware  it('should render correctly', () => {
196b426787SSurenNeware    expect(wrapper.element).toMatchSnapshot();
206b426787SSurenNeware  });
216b426787SSurenNeware});
22