VueTorrent/tests/helpers.js

24 lines
492 B
JavaScript
Raw Normal View History

import Vue from 'vue'
2021-01-27 15:24:23 +03:00
import { createLocalVue, mount } from '@vue/test-utils'
import Vuetify from 'vuetify'
import { Ripple } from 'vuetify/lib/directives'
import filters from '@/filters'
Vue.use(Vuetify, {
directives: {
Ripple
}
})
2021-01-27 15:24:23 +03:00
export function setup(component, propsData) {
const localVue = createLocalVue() // because of vuetify, we should use a localVue instance
const vuetify = new Vuetify()
return mount(component, {
localVue,
vuetify,
propsData
})
}