mirror of
https://github.com/koel/koel
synced 2024-12-21 01:53:11 +00:00
19 lines
487 B
TypeScript
19 lines
487 B
TypeScript
import { screen } from '@testing-library/vue'
|
|
import { expect, it } from 'vitest'
|
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
|
import TextInput from './TextInput.vue'
|
|
|
|
new class extends UnitTestCase {
|
|
protected test () {
|
|
it('emits value', async () => {
|
|
const { emitted } = this.render(TextInput)
|
|
|
|
await this.type(screen.getByRole('textbox'), 'Hi')
|
|
|
|
expect(emitted()['update:modelValue']).toStrictEqual([
|
|
['H'],
|
|
['Hi']
|
|
])
|
|
})
|
|
}
|
|
}
|