mirror of
https://github.com/koel/koel
synced 2024-12-20 17:43:36 +00:00
24 lines
666 B
TypeScript
24 lines
666 B
TypeScript
import factory from '@/__tests__/factory'
|
|
import { expect, it } from 'vitest'
|
|
import ComponentTestCase from '@/__tests__/ComponentTestCase'
|
|
import AlbumTrackList from './AlbumTrackList.vue'
|
|
import TrackListItem from './AlbumTrackListItem.vue'
|
|
|
|
new class extends ComponentTestCase {
|
|
protected test () {
|
|
it('lists the correct number of tracks', () => {
|
|
const { queryAllByTestId } = this.render(AlbumTrackList, {
|
|
props: {
|
|
album: factory<Album>('album')
|
|
},
|
|
global: {
|
|
stubs: {
|
|
TrackListItem
|
|
}
|
|
}
|
|
})
|
|
|
|
expect(queryAllByTestId('album-track-item')).toHaveLength(2)
|
|
})
|
|
}
|
|
}
|