feat: Add getCourses (#798)

* feat: add getCourses function to retrieve courses

* chore: Change getCourses function to return Feed instead of TabbedFeed
This commit is contained in:
YBD Project
2024-11-19 16:56:57 +09:00
committed by GitHub
parent 71d9ebc5fd
commit cfb48fab89
2 changed files with 15 additions and 0 deletions

View File

@@ -165,6 +165,14 @@ describe('YouTube.js Tests', () => {
expect(trending.videos.length).toBeGreaterThan(0);
});
test('Innertube#getCourses', async () => {
const courses = await innertube.getCourses();
expect(courses).toBeDefined();
expect(courses.page.contents).toBeDefined();
expect(courses.page.contents_memo).toBeDefined();
expect(courses.shelves.length).toBeGreaterThan(0);
});
describe('Innertube#getChannel', () => {
let channel: YT.Channel;