File size: 644 Bytes
11acfd9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { expect, test } from "vitest";
import { scrapeHomePage } from "../src/parsers/index.js";

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([]);
});