Я получаю эту ошибку: TypeError: r.Vuetify is not a constructor
при запуске npm t
с mochapack.
... со следующим модульным тестом:
import 'babel-polyfill';
import { Vuetify, VSelect } from 'vuetify'
// import { shallowMount } from '@vue/test-utils'
import account_info from './account_info.vue'
// Utilities
import {
mount,
createLocalVue
} from '@vue/test-utils'
const localVue = createLocalVue()
// localVue.use(Vuetify);
localVue.component("v-select", VSelect);
describe('account_info.vue', () => {
let vuetify
beforeEach(() => {
vuetify = new Vuetify();
})
it('Check for account balance', () => {
const wrapper = mount(account_info, {
localVue,
vuetify
})
// wrapper.find('button').trigger('click')
expect(wrapper.find('div > div').text()).toMatch('Balance')
})
})