mirror of
https://github.com/koel/koel
synced 2024-12-01 08:19:18 +00:00
24 lines
731 B
TypeScript
24 lines
731 B
TypeScript
import { expect, it } from 'vitest'
|
|
import factory from '@/__tests__/factory'
|
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
|
import FooterMiddlePane from './FooterMiddlePane.vue'
|
|
|
|
new class extends UnitTestCase {
|
|
protected test () {
|
|
it('renders without a song', () => expect(this.render(FooterMiddlePane).html()).toMatchSnapshot())
|
|
|
|
it('renders with a song', () => {
|
|
expect(this.render(FooterMiddlePane, {
|
|
props: {
|
|
song: factory<Song>('song', {
|
|
title: 'Fahrstuhl to Heaven',
|
|
artist_name: 'Led Zeppelin',
|
|
artist_id: 3,
|
|
album_name: 'Led Zeppelin IV',
|
|
album_id: 4
|
|
})
|
|
}
|
|
}).html()).toMatchSnapshot()
|
|
})
|
|
}
|
|
}
|