koel/resources/assets/js/components/ui/ViewModeSwitch.spec.ts

16 lines
433 B
TypeScript
Raw Normal View History

import { expect, it } from 'vitest'
2022-05-13 17:58:38 +00:00
import UnitTestCase from '@/__tests__/UnitTestCase'
import ViewModeSwitch from './ViewModeSwitch.vue'
2022-05-13 17:58:38 +00:00
new class extends UnitTestCase {
protected test () {
it.each<[ArtistAlbumViewMode]>([['thumbnails'], ['list']])('renders %s mode', mode => {
expect(this.render(ViewModeSwitch, {
props: {
modelValue: mode,
},
}).html()).toMatchSnapshot()
})
}
}