SurenNeware | 6b42678 | 2020-12-31 20:46:40 +0530 | [diff] [blame] | 1 | import { mount, createLocalVue } from '@vue/test-utils'; |
| 2 | import InfoTooltip from '@/components/Global/InfoTooltip'; |
Derick Montague | e88b816 | 2021-01-06 23:33:14 -0600 | [diff] [blame] | 3 | import { BootstrapVue } from 'bootstrap-vue'; |
SurenNeware | 6b42678 | 2020-12-31 20:46:40 +0530 | [diff] [blame] | 4 | |
Derick Montague | 7def324 | 2021-01-06 23:38:11 -0600 | [diff] [blame] | 5 | process.env.BOOTSTRAP_VUE_NO_WARN = true; |
SurenNeware | 6b42678 | 2020-12-31 20:46:40 +0530 | [diff] [blame] | 6 | const localVue = createLocalVue(); |
Derick Montague | e88b816 | 2021-01-06 23:33:14 -0600 | [diff] [blame] | 7 | localVue.use(BootstrapVue); |
SurenNeware | 6b42678 | 2020-12-31 20:46:40 +0530 | [diff] [blame] | 8 | |
| 9 | describe('InfoTooltip.vue', () => { |
| 10 | const wrapper = mount(InfoTooltip, { |
| 11 | localVue, |
| 12 | propsData: { |
| 13 | title: 'A tooltip test title', |
| 14 | }, |
| 15 | mocks: { |
| 16 | $t: (key) => key, |
| 17 | }, |
| 18 | }); |
| 19 | it('should exist', () => { |
| 20 | expect(wrapper.exists()).toBe(true); |
| 21 | }); |
SurenNeware | 6b42678 | 2020-12-31 20:46:40 +0530 | [diff] [blame] | 22 | it('should render correctly', () => { |
| 23 | expect(wrapper.element).toMatchSnapshot(); |
| 24 | }); |
| 25 | }); |