chore: fix tests

This commit is contained in:
Luan
2024-06-21 20:57:38 -03:00
parent 055fa33403
commit fe953072a2
2 changed files with 6 additions and 2 deletions

View File

@@ -140,6 +140,10 @@ class Playlist {
return this.#page;
}
get items(): ObservedArray<MusicResponsiveListItem> {
return this.contents || observe([]);
}
get has_continuation(): boolean {
return !!this.#continuation;
}

View File

@@ -381,8 +381,8 @@ describe('YouTube.js Tests', () => {
const playlist = await innertube.music.getPlaylist('PLQxo8OvVvJ1WI_Bp67F2wdIl_R2Rc_1-u');
expect(playlist).toBeDefined();
expect(playlist.header).toBeDefined();
expect(playlist.items).toBeDefined();
expect(playlist.items?.length).toBeGreaterThan(0);
expect(playlist.contents).toBeDefined();
expect(playlist.contents?.length).toBeGreaterThan(0);
});
test('Innertube#music.getLyrics', async () => {