test: added homePage anime info test
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
import { scrapeHomePage } from "../src/parsers";
|
||||||
|
|
||||||
|
test("returns anime information present in homepage", async () => {
|
||||||
|
const data = await scrapeHomePage();
|
||||||
|
|
||||||
|
expect(data.spotlightAnimes).not.toEqual([]);
|
||||||
|
expect(data.trendingAnimes).not.toEqual([]);
|
||||||
|
expect(data.latestEpisodeAnimes).not.toEqual([]);
|
||||||
|
expect(data.topUpcomingAnimes).not.toEqual([]);
|
||||||
|
expect(data.topAiringAnimes).not.toEqual([]);
|
||||||
|
expect(data.genres).not.toEqual([]);
|
||||||
|
|
||||||
|
expect(data.top10Animes.today).not.toEqual([]);
|
||||||
|
expect(data.top10Animes.week).not.toEqual([]);
|
||||||
|
expect(data.top10Animes.month).not.toEqual([]);
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user