mirror of
https://github.com/koel/koel
synced 2024-11-24 13:13:05 +00:00
fix: broken tests in Node 14
This commit is contained in:
parent
f021d41e9d
commit
784374382a
2 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ let artist: Artist
|
|||
new class extends UnitTestCase {
|
||||
private async renderComponent (mode: MediaInfoDisplayMode = 'aside', info?: ArtistInfo) {
|
||||
commonStore.state.use_last_fm = true
|
||||
info ??= factory<ArtistInfo>('artist-info')
|
||||
info = info ?? factory<ArtistInfo>('artist-info')
|
||||
artist = factory<Artist>('artist', { name: 'Led Zeppelin' })
|
||||
|
||||
const fetchMock = this.mock(mediaInfoService, 'fetchForArtist').mockResolvedValue(info)
|
||||
|
|
|
@ -11,12 +11,12 @@ let playlist: Playlist
|
|||
|
||||
new class extends UnitTestCase {
|
||||
private async renderComponent (songs: Song[]) {
|
||||
playlist ||= factory<Playlist>('playlist')
|
||||
playlist = playlist || factory<Playlist>('playlist')
|
||||
playlistStore.init([playlist])
|
||||
|
||||
const fetchMock = this.mock(songStore, 'fetchForPlaylist').mockResolvedValue(songs)
|
||||
|
||||
const rendered = this.render(PlaylistScreen)
|
||||
this.render(PlaylistScreen)
|
||||
|
||||
await this.router.activateRoute({
|
||||
path: `playlists/${playlist.id}`,
|
||||
|
|
Loading…
Reference in a new issue