mirror of
https://github.com/koel/koel
synced 2024-12-21 10:03:10 +00:00
14 lines
479 B
TypeScript
14 lines
479 B
TypeScript
import { screen } from '@testing-library/vue'
|
|
import { expect, it } from 'vitest'
|
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
|
import SidebarToggleButton from './SidebarToggleButton.vue'
|
|
|
|
new class extends UnitTestCase {
|
|
protected test () {
|
|
it('emits the toggle event', () => {
|
|
const { emitted } = this.render(SidebarToggleButton)
|
|
this.trigger(screen.getByRole('checkbox'), 'click')
|
|
expect(emitted()['update:modelValue']).toBeTruthy()
|
|
})
|
|
}
|
|
}
|