UNPKG

@cnamts/vue-dot

Version:

Implementation of our Design System for the French Health Insurance

46 lines (36 loc) 694 B
import Vue from 'vue'; import { Wrapper } from '@vue/test-utils'; import { mountComponent } from '@/tests'; import CustomIcon from '../'; let wrapper: Wrapper<Vue>; const VD_OPTIONS = { theme: { icons: { test: 'icon-src' } } }; const mocks = { $vd: VD_OPTIONS }; describe('CustomIcon', () => { it('renders correctly', () => { wrapper = mountComponent(CustomIcon, { mocks, propsData: { icon: 'test' } }); expect(wrapper).toMatchSnapshot(); }); it('renders correctly with a custom size', () => { wrapper = mountComponent(CustomIcon, { mocks, propsData: { icon: 'test', size: '64px' } }); expect(wrapper).toMatchSnapshot(); }); });