mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-20 20:01:25 +00:00
28 lines
553 B
TypeScript
28 lines
553 B
TypeScript
import { describe, expect, beforeEach } from 'vitest'
|
|
import { shallowMount } from '@vue/test-utils'
|
|
import Comp from './CopyField.vue'
|
|
|
|
describe('CopyField.vue', () => {
|
|
let wrapper
|
|
|
|
beforeEach(() => {
|
|
wrapper = shallowMount(Comp, {
|
|
slots: {
|
|
default: 'Test'
|
|
}
|
|
})
|
|
})
|
|
|
|
it('defaults to div', () => {
|
|
expect(wrapper.props().tag).toEqual('div')
|
|
})
|
|
|
|
it('displays text', () => {
|
|
expect(wrapper.text()).toEqual('Test')
|
|
})
|
|
|
|
it('matches snapshot', () => {
|
|
expect(wrapper.element).toMatchSnapshot()
|
|
})
|
|
})
|