UNPKG

@ishitatsuyuki/oruga-next

Version:

UI components for Vue.js and CSS framework agnostic

32 lines (26 loc) 684 B
import { mount } from '@vue/test-utils' import OSlider from '@components/slider/Slider' import OSliderTick from '@components/slider/SliderTick' let wrapper let wrapperParent const WrapperComp = { template: ` <OSlider> <OSliderTick ref="tick" /> </OSlider>`, components: { OSlider, OSliderTick } } describe('OSliderTick', () => { beforeEach(() => { wrapperParent = mount(WrapperComp) wrapper = wrapperParent.find({ ref: 'tick' }) }) it('is called', () => { expect(wrapper.exists()).toBeTruthy() }) it('render correctly', () => { expect(wrapper.html()).toMatchSnapshot() }) })