mirror of
https://github.com/koel/koel
synced 2024-12-21 10:03:10 +00:00
24 lines
651 B
TypeScript
24 lines
651 B
TypeScript
import factory from '@/__tests__/factory'
|
|
import { expect, it } from 'vitest'
|
|
import UnitTestCase from '@/__tests__/UnitTestCase'
|
|
import AlbumTrackList from './AlbumTrackList.vue'
|
|
import TrackListItem from './AlbumTrackListItem.vue'
|
|
|
|
new class extends UnitTestCase {
|
|
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)
|
|
})
|
|
}
|
|
}
|