aboutsummaryrefslogtreecommitdiff
path: root/test/animeGenre.test.ts
blob: f08ad1b646bbcb7e5b51589cfbaf620a0c3be4de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { expect, test } from "vitest";
import { HiAnime } from "aniwatch";

const genreName = "shounen";
const page = 2;

// npx vitest run animeGenre.test.ts
test(`GET /api/v2/hianime/genre/${genreName}?page=${page}`, async () => {
  const hianime = new HiAnime.Scraper();

  const data = await hianime.getGenreAnime(genreName, page);

  expect(data.animes).not.toEqual([]);
  expect(data.genres).not.toEqual([]);
  expect(data.topAiringAnimes).not.toEqual([]);
});