element3
Version:
A Component Library for Vue3
17 lines (16 loc) • 379 B
JavaScript
import { mount } from '@vue/test-utils'
import Main from '../Main.vue'
describe('Main.vue', () => {
test('Main 渲染', () => {
const wrapper = mount(Main)
expect(wrapper.classes()).toContain('el-main')
})
it('slot', () => {
const wrapper = mount(Main, {
slots: {
default: () => 'abc'
}
})
expect(wrapper.text()).toBe('abc')
})
})