koel/resources/assets/js/components/layout/main-wrapper/sidebar/SidebarToggleButon.spec.ts
2024-07-06 17:45:01 +02:00

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()
})
}
}