This repository has been archived on 2026-07-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
aniwatch-api/test/homePage.test.ts
T
Ritesh Ghosh 46f688ac12 Aniwatch API Version 2 (#66)
BREAKING CHANGE:

* chore: remove files that are not necessary for api v2

* test: update existing tests to use  pkg

* feat: organized aniwatch api envs and add more info about them

* feat: update tsconfig to include strict noUnsed params

* feat(api homepage): revamp api home page

* feat: update wani kuni image

* feat: add dot img

* feat: use hono cors

* feat: use hono rate limiter

* build: remove unnecessary deps, add ones needed and update description

* feat: add hianime routes and their handlers

* feat: update vercel deployment file

* docs: update logo and scraper docs, add envs section

* feat: update main server file

* feat: update peronal deployments caution section
2024-10-06 01:13:23 +05:30

22 lines
802 B
TypeScript

import { expect, test } from "vitest";
import { HiAnime } from "aniwatch";
test("GET /api/v2/hianime/home", async () => {
const hianime = new HiAnime.Scraper();
const data = await hianime.getHomePage();
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.mostPopularAnimes).not.toEqual([]);
expect(data.mostFavoriteAnimes).not.toEqual([]);
expect(data.latestCompletedAnimes).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([]);
});