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

const animeEpisodeId = "steinsgate-3?ep=230";
const server = "hd-1";
const category = "sub";

// npx vitest run animeEpisodeSrcs.test.ts
test(`GET /api/v2/hianime/episode/sources?animeEpisodeId=${animeEpisodeId}&server=${server}&category=${category}`, async () => {
  const hianime = new HiAnime.Scraper();
  const data = await hianime.getEpisodeSources(
    animeEpisodeId,
    server,
    category
  );

  expect(data.sources).not.toEqual([]);
});