2022-05-12 13:21:14 +00:00
|
|
|
import { expect, it } from 'vitest'
|
2022-05-13 17:58:38 +00:00
|
|
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
2022-05-12 13:21:14 +00:00
|
|
|
import ViewModeSwitch from './ViewModeSwitch.vue'
|
|
|
|
|
2022-05-13 17:58:38 +00:00
|
|
|
new class extends UnitTestCase {
|
2022-05-12 13:21:14 +00:00
|
|
|
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
|
2022-05-12 13:21:14 +00:00
|
|
|
}
|
|
|
|
}).html()).toMatchSnapshot()
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|