import { mount } from '@vue/test-utils'
import { describe, expect, test } from 'vitest'
import Text from '../src/text.vue'
const AXIOM = 'Rem is the best girl'
describe('Text.vue', () => {
test('create', () => {
const wrapper = mount(() => )
expect(wrapper.classes()).toContain('el-text')
})
test('type', () => {
const wrapper = mount(() => )
expect(wrapper.classes()).toContain('el-text--success')
})
test('size', () => {
const wrapper = mount(() => )
expect(wrapper.classes()).toContain('el-text--large')
})
test('truncated', () => {
const wrapper = mount(() => )
expect(wrapper.classes()).toContain('is-truncated')
})
test('line-clamp', () => {
const wrapper = mount(() => )
expect(wrapper.classes()).toContain('is-line-clamp')
})
test('tag', () => {
const wrapper = mount(() => )
expect(wrapper.vm.$el.tagName).toEqual('DEL')
})
test('default slot', () => {
const wrapper = mount(() => (
AXIOM,
}}
/>
))
expect(wrapper.text()).toEqual(AXIOM)
})
})