fix: some test errors

This commit is contained in:
Phan An 2022-09-15 00:40:08 +07:00
parent 8c452dd0e1
commit b6465c61e7
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC
3 changed files with 3 additions and 3 deletions

View file

@ -14,4 +14,4 @@ window.HTMLMediaElement.prototype.load = vi.fn()
window.HTMLMediaElement.prototype.play = vi.fn()
window.HTMLMediaElement.prototype.pause = vi.fn()
window.BASE_URL = 'https://koel.test/'
window.BASE_URL = 'http://localhost/'

View file

@ -21,7 +21,7 @@ export const downloadService = {
},
fromFavorites () {
if (favoriteStore.all.length) {
if (favoriteStore.state.songs.length) {
this.trigger('favorites')
}
},

View file

@ -163,7 +163,7 @@ new class extends UnitTestCase {
it('gets shareable URL', () => {
const song = factory<Song>('song', { id: 'foo' })
expect(songStore.getShareableUrl(song)).toBe('https://koel.test/#!/song/foo')
expect(songStore.getShareableUrl(song)).toBe('http://localhost/#!/song/foo')
})
it('syncs with the vault', () => {