From 59bd46cc3526a70f7ceeb8d7d55e4ff10e8ecb9b Mon Sep 17 00:00:00 2001 From: Ritesh Ghosh Date: Mon, 7 Aug 2023 20:38:43 +0530 Subject: test: added animeCategory test --- test/animeCategory.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/animeCategory.test.ts (limited to 'test') diff --git a/test/animeCategory.test.ts b/test/animeCategory.test.ts new file mode 100644 index 0000000..dd20e77 --- /dev/null +++ b/test/animeCategory.test.ts @@ -0,0 +1,11 @@ +import { scrapeAnimeCategory } from "../src/parsers"; + +test("returns animes belonging to a category", async () => { + const data = await scrapeAnimeCategory("subbed-anime"); + + expect(data.animes).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([]); +}); -- cgit v1.2.3