Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Jun 21, 2024
1 parent 055fa33 commit fe95307
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/parser/ytmusic/Playlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ class Playlist {
return this.#page;
}

get items(): ObservedArray<MusicResponsiveListItem> {
return this.contents || observe([]);
}

get has_continuation(): boolean {
return !!this.#continuation;
}
Expand Down
4 changes: 2 additions & 2 deletions test/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit fe95307

Please sign in to comment.