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

16 lines
431 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: {
2022-05-29 21:51:58 +00:00
modelValue: mode
}
}).html()).toMatchSnapshot()
})
}
}