mirror of
https://github.com/koel/koel
synced 2024-09-20 14:21:55 +00:00
Add main-wrapper/main-content/index tests
This commit is contained in:
parent
f86f5f9a6f
commit
7c9518125b
1 changed files with 16 additions and 0 deletions
|
@ -0,0 +1,16 @@
|
|||
import Component from '@/components/main-wrapper/main-content/index.vue'
|
||||
import { event } from '@/utils'
|
||||
import factory from '@/tests/factory'
|
||||
|
||||
describe('components/main-wrapper/main-content/index', () => {
|
||||
it('has a translucent image per song/album', () => {
|
||||
const wrapper = shallow(Component)
|
||||
const song = factory('song', {
|
||||
album: factory('album', {
|
||||
cover: 'http://foo/bar.jpg'
|
||||
})
|
||||
})
|
||||
event.emit('song:played', song)
|
||||
wrapper.vm.albumCover.should.equal(song.album.cover)
|
||||
})
|
||||
})
|
Loading…
Reference in a new issue