Nychthemeron/packages/library/tests/Textarea.spec.ts
Matthew L McPeak 38674be217
All checks were successful
ci / build (push) Successful in 35s
ci / publish (push) Successful in 11s
ci / publish-docs (push) Successful in 1m4s
Inital Commit
2026-07-15 20:47:53 -04:00

18 lines
607 B
TypeScript

import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'
import { Textarea } from '../src/lib'
describe('Textarea', () => {
it('renders a native textarea element', () => {
const wrapper = mount(Textarea)
expect(wrapper.element.tagName).toBe('TEXTAREA')
})
it('supports v-model', async () => {
const wrapper = mount(Textarea, { props: { modelValue: 'An omen' } })
expect((wrapper.element as HTMLTextAreaElement).value).toBe('An omen')
await wrapper.setValue('A crow')
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(['A crow'])
})
})