mirror of
https://github.com/koel/koel
synced 2024-12-21 01:53:11 +00:00
18 lines
483 B
TypeScript
18 lines
483 B
TypeScript
|
import { expect, it } from 'vitest'
|
||
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
||
|
import { eventBus } from '@/utils'
|
||
|
import YouTubeSidebarItem from './YouTubeSidebarItem.vue'
|
||
|
|
||
|
new class extends UnitTestCase {
|
||
|
protected test() {
|
||
|
it('renders', async () => {
|
||
|
const { html } = this.render(YouTubeSidebarItem)
|
||
|
|
||
|
eventBus.emit('PLAY_YOUTUBE_VIDEO', { id: '123', title: 'A Random Video' })
|
||
|
await this.tick()
|
||
|
|
||
|
expect(html()).toMatchSnapshot()
|
||
|
})
|
||
|
}
|
||
|
}
|