Fix broken info-tooltip spec and snapshot
- Two of the test are not needed since they are testing the vue
internal functionality of rendering a title attribute value
correctly and importing the right carbon icon. For this test the only
tests needed is the snapshot. It could be debated that this component
does not require a spec at all.
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: Icca107b185cd579d47877d50ec5763c5ffffc06a
diff --git a/tests/unit/Global/InfoTooltip.spec.js b/tests/unit/Global/InfoTooltip.spec.js
index 90cb301..37290f6 100644
--- a/tests/unit/Global/InfoTooltip.spec.js
+++ b/tests/unit/Global/InfoTooltip.spec.js
@@ -1,7 +1,9 @@
import { mount, createLocalVue } from '@vue/test-utils';
import InfoTooltip from '@/components/Global/InfoTooltip';
+import { BootstrapVue } from 'bootstrap-vue';
const localVue = createLocalVue();
+localVue.use(BootstrapVue);
describe('InfoTooltip.vue', () => {
const wrapper = mount(InfoTooltip, {
@@ -16,12 +18,6 @@
it('should exist', () => {
expect(wrapper.exists()).toBe(true);
});
- it('should render title attribute for button', () => {
- expect(wrapper.attributes('title')).toBe('title');
- });
- it('should render icon-tooltip element', () => {
- expect(wrapper.find('icon-tooltip').exists()).toBe(true);
- });
it('should render correctly', () => {
expect(wrapper.element).toMatchSnapshot();
});